From ed0d22555498ebbb2127e6986f3c137048600861 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 14 May 2022 15:11:11 +0200 Subject: [PATCH] sfd --- files/__main__.py | 2 +- files/helpers/sanitize.py | 2 +- files/routes/login.py | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/files/__main__.py b/files/__main__.py index 683af649c..d329414f0 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -119,7 +119,7 @@ def after_request(response): if app.config["SERVER_NAME"] == 'localhost': from files.routes import * - from files.routes.chat import * + # from files.routes.chat import * elif "load_chat" in argv: from files.routes.chat import * else: diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index c705f7e20..e728be6ac 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -327,7 +327,7 @@ def filter_emojis_only(title, edit=False, graceful=False): title = strikethrough_regex.sub(r'\1', title) - sanitized = bleach.clean(title, tags=['img','del'], attributes=allowed_attributes_emojis, protocols=['http','https']) + title = bleach.clean(title, tags=['img','del'], attributes=allowed_attributes_emojis, protocols=['http','https']) signal.alarm(0) diff --git a/files/routes/login.py b/files/routes/login.py index df632640b..949b9834a 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -324,6 +324,8 @@ def sign_up_post(v): profileurl = '/e/' + random.choice(marseys_const) + '.webp' + if SITE == "watchpeopledie.co": print(f'1: {username}') + new_user = User( username=username, original_username = username, @@ -335,9 +337,13 @@ def sign_up_post(v): profileurl=profileurl ) + if SITE == "watchpeopledie.co": print(f'2: {username}') + g.db.add(new_user) g.db.flush() + if SITE == "watchpeopledie.co": print(f'3: {username}') + if ref_id: ref_user = g.db.query(User).filter_by(id=ref_id).one_or_none() @@ -367,9 +373,13 @@ def sign_up_post(v): session.permanent = True session["session_id"] = token_hex(49) session["lo_user"] = new_user.id + + if SITE == "watchpeopledie.co": print(f'4: {username}') g.db.commit() + if SITE == "watchpeopledie.co": print(f'5: {username}') + return redirect(SITE_FULL)