Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
Finally fixed this
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeDEV committed Sep 4, 2022
1 parent 2d72af5 commit eefa09c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cloudlink/supporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,12 @@ def isPacketSane(self, message, keycheck=["cmd", "val"], datalimit=1000):
is_sane = False

if "val" in tmp_msg:
origin_type = type(tmp_msg["val"])
if not(type(tmp_msg["val"]) in [str, dict, list]):
tmp_msg["val"] = str(tmp_msg["val"])
if len(tmp_msg["val"]) > datalimit:
is_sane = False
tmp_msg["val"] = origin_type(tmp_msg["val"])

if "name" in tmp_msg:
if type(tmp_msg["name"]) != str:
Expand Down

0 comments on commit eefa09c

Please sign in to comment.