remotes/1693045480750635534/spooky-22
Aevann1 2022-05-14 15:11:11 +02:00
parent caa81452f4
commit ed0d225554
3 changed files with 12 additions and 2 deletions

View File

@ -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:

View File

@ -327,7 +327,7 @@ def filter_emojis_only(title, edit=False, graceful=False):
title = strikethrough_regex.sub(r'<del>\1</del>', 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)

View File

@ -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)