diff --git a/app.py b/app.py index 5e020f3..07212f7 100644 --- a/app.py +++ b/app.py @@ -292,16 +292,18 @@ def post_change_pwd(): @post('/delete') def post_delete(): form = request.forms.getunicode + tools = Tools() def error(msg): return delete_tpl(alerts=[('error', msg, 'fadeOut')], str=i18n.str) try: username = newSession().get()['username'] - if(form('username').lower() == username): + if(tools.input_validation(form('username')) and form('username').lower() == username): del_user(username) else: return(error(i18n.msg[19])) + except Error as e: LOG.warning("Unsuccessful attempt to delete the account: %s" % e) return error(str(e)) diff --git a/libs/__pycache__/flist.cpython-39.pyc b/libs/__pycache__/flist.cpython-39.pyc index fd0bc85..d1a1008 100644 Binary files a/libs/__pycache__/flist.cpython-39.pyc and b/libs/__pycache__/flist.cpython-39.pyc differ diff --git a/libs/__pycache__/helper.cpython-39.pyc b/libs/__pycache__/helper.cpython-39.pyc index 56f48f6..ff1546f 100644 Binary files a/libs/__pycache__/helper.cpython-39.pyc and b/libs/__pycache__/helper.cpython-39.pyc differ diff --git a/libs/__pycache__/localization.cpython-39.pyc b/libs/__pycache__/localization.cpython-39.pyc index 5846bf6..99af77f 100644 Binary files a/libs/__pycache__/localization.cpython-39.pyc and b/libs/__pycache__/localization.cpython-39.pyc differ diff --git a/libs/__pycache__/slist.cpython-39.pyc b/libs/__pycache__/slist.cpython-39.pyc index 0b0bb15..4d2b8a4 100644 Binary files a/libs/__pycache__/slist.cpython-39.pyc and b/libs/__pycache__/slist.cpython-39.pyc differ