mirror of
https://github.com/wolfswolke/DeathGarden_API_Rebirth.git
synced 2026-03-21 17:54:09 -05:00
added checks so sanitized values dont get messed up
This commit is contained in:
parent
67b32f3304
commit
285b8678ac
|
|
@ -143,6 +143,16 @@ def check_for_game_client(check_type="strict"):
|
|||
def sanitize_input(input_value):
|
||||
if input_value is None:
|
||||
return None
|
||||
if isinstance(input_value, int):
|
||||
return input_value
|
||||
if isinstance(input_value, float):
|
||||
return input_value
|
||||
if isinstance(input_value, bool):
|
||||
return input_value
|
||||
if isinstance(input_value, dict):
|
||||
for key in input_value:
|
||||
input_value[key] = bleach.clean(str(input_value[key]))
|
||||
return input_value
|
||||
return bleach.clean(str(input_value))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user