Change log: https://roxy-wi.org/changelog.py#6_1_1
pull/328/head
Pavel Loginov 2022-07-08 21:59:15 +03:00
parent 82666df1e6
commit 791802ee02
1 changed files with 5 additions and 3 deletions

View File

@ -30,12 +30,14 @@ def is_ip_or_dns(server_from_request: str) -> str:
return '' return ''
def checkAjaxInput(ajax_input: str) -> bool: def checkAjaxInput(ajax_input: str) -> str:
pattern = re.compile('[&;|$`]') pattern = re.compile('[&;|$`]')
if pattern.search(ajax_input): if pattern.search(ajax_input):
return True print('error: nice try')
sys.exit()
else: else:
return False from shlex import quote
return quote(ajax_input)
form = cgi.FieldStorage() form = cgi.FieldStorage()