From 32b2cf53b3cf74017fe945c54d1e324690f06406 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 21 Dec 2021 09:53:55 +0200 Subject: [PATCH 1/6] sfdsfd --- files/routes/posts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index f4050d34aa..352bb52616 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -771,7 +771,7 @@ def submit_post(v): domain = parsed_url.netloc qd = parse_qs(parsed_url.query) - filtered = dict((k, v) for k, v in qd.items() if not k.startswith('utm_') and not k.startswith('ref_')) + filtered = dict((k, val) for k, val in qd.items() if not k.startswith('utm_') and not k.startswith('ref_')) new_url = ParseResult(scheme="https", netloc=parsed_url.netloc, From c6474d1870f0edab870659b80fb97bff85f901cd Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 21 Dec 2021 09:57:43 +0200 Subject: [PATCH 2/6] sfdsdf --- files/helpers/wrappers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/helpers/wrappers.py b/files/helpers/wrappers.py index 02e1b3e90e..4207b858e1 100644 --- a/files/helpers/wrappers.py +++ b/files/helpers/wrappers.py @@ -4,10 +4,10 @@ from files.helpers.const import * def get_logged_in_user(): - token = request.headers.get("Authorization") + token = request.headers.get("Authorization","").strip() if token: - client = g.db.query(ClientAuth).filter(ClientAuth.access_token == token).first() + client = g.db.query(ClientAuth).filter(ClientAuth.access_token == token).one_or_none() if not client: return None v = client.user @@ -21,7 +21,7 @@ def get_logged_in_user(): if not uid or not logged_in or uid != logged_in: return None try: - if g.db: v = g.db.query(User).filter_by(id=uid).one_or_none() + if g.db: v = g.db.query(User).filter_by(id=logged_in).one_or_none() else: return None except: return None From 9199411339a4375c2fcd4f72c2032670b36b0cb7 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 21 Dec 2021 09:59:24 +0200 Subject: [PATCH 3/6] fds --- files/routes/awards.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/routes/awards.py b/files/routes/awards.py index 11f5f91d0f..24dee9cddf 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -241,6 +241,7 @@ def award_post(pid, v): link = f"[this post]({post.permalink})" send_repeatable_notification(author.id, f"Your account has been suspended permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass to get unbanned!") send_repeatable_notification(CARP_ID, f"@{v.username} used {kind} award on [{post.shortlink}]({post.shortlink})") + send_repeatable_notification(DAD_ID, f"@{v.username} used {kind} award on [{post.shortlink}]({post.shortlink})") elif kind == "pin": if post.stickied and post.stickied.startswith("t:"): t = int(post.stickied[2:]) + 3600 else: t = int(time.time()) + 3600 @@ -413,6 +414,7 @@ def award_comment(cid, v): link = f"[this comment]({c.permalink})" send_repeatable_notification(author.id, f"Your account has been suspended permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass to get unbanned!") send_repeatable_notification(CARP_ID, f"@{v.username} used {kind} award on [{c.shortlink}]({c.shortlink})") + send_repeatable_notification(DAD_ID, f"@{v.username} used {kind} award on [{c.shortlink}]({c.shortlink})") elif kind == "pin": if c.is_pinned and c.is_pinned.startswith("t:"): t = int(c.is_pinned[2:]) + 3600 else: t = int(time.time()) + 3600 From 28aa7c5cf0b689f32ed4eab305c6df8ccfa3c549 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 21 Dec 2021 10:00:29 +0200 Subject: [PATCH 4/6] fdsfsd --- files/routes/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/settings.py b/files/routes/settings.py index 7a05df8155..0f79d246d6 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -52,7 +52,7 @@ def sex(v): users = g.db.query(User).filter(User.patron > 0, User.patron < 5).all() for u in users: - if not u.email or u.email.lower() not in emails: print(u.username) + if not u.email or u.email.lower() not in emails: print(u.username + ' - ' + u.email) return "sex" From 8a0866da0ac96e4c443ee56d473c7eaab0d1710b Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 21 Dec 2021 10:01:29 +0200 Subject: [PATCH 5/6] dfsfsd --- files/templates/CHRISTMAS/authforms.html | 4 ++-- files/templates/CHRISTMAS/default.html | 4 ++-- files/templates/CHRISTMAS/login.html | 4 ++-- files/templates/CHRISTMAS/login_2fa.html | 2 +- files/templates/CHRISTMAS/settings.html | 4 ++-- files/templates/CHRISTMAS/sign_up.html | 4 ++-- files/templates/CHRISTMAS/sign_up_failed_ref.html | 2 +- files/templates/CHRISTMAS/tailwind.html | 2 +- files/templates/authforms.html | 4 ++-- files/templates/default.html | 4 ++-- files/templates/log.html | 4 ++-- files/templates/login.html | 2 +- files/templates/login_2fa.html | 2 +- files/templates/settings.html | 2 +- files/templates/settings2.html | 4 ++-- files/templates/sign_up.html | 2 +- files/templates/sign_up_failed_ref.html | 2 +- files/templates/submit.html | 4 ++-- 18 files changed, 28 insertions(+), 28 deletions(-) diff --git a/files/templates/CHRISTMAS/authforms.html b/files/templates/CHRISTMAS/authforms.html index 0ef68cfd27..e4bec20497 100644 --- a/files/templates/CHRISTMAS/authforms.html +++ b/files/templates/CHRISTMAS/authforms.html @@ -14,11 +14,11 @@ {% if v %} - + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - + {% endif %} diff --git a/files/templates/CHRISTMAS/default.html b/files/templates/CHRISTMAS/default.html index 45dbf556b5..3a58e034e7 100644 --- a/files/templates/CHRISTMAS/default.html +++ b/files/templates/CHRISTMAS/default.html @@ -186,9 +186,9 @@ {% block stylesheets %} - + - + diff --git a/files/templates/CHRISTMAS/login.html b/files/templates/CHRISTMAS/login.html index 86c637bbd7..90d9729578 100644 --- a/files/templates/CHRISTMAS/login.html +++ b/files/templates/CHRISTMAS/login.html @@ -13,9 +13,9 @@ Login - {{'SITE_NAME' | app_config}} {% endblock %} - + - + diff --git a/files/templates/CHRISTMAS/login_2fa.html b/files/templates/CHRISTMAS/login_2fa.html index 8fa4ef088f..680b9c82d2 100644 --- a/files/templates/CHRISTMAS/login_2fa.html +++ b/files/templates/CHRISTMAS/login_2fa.html @@ -13,7 +13,7 @@ 2-Step Login - {{'SITE_NAME' | app_config}} - + diff --git a/files/templates/CHRISTMAS/settings.html b/files/templates/CHRISTMAS/settings.html index 8482e14ed3..b8e27a94d6 100644 --- a/files/templates/CHRISTMAS/settings.html +++ b/files/templates/CHRISTMAS/settings.html @@ -28,9 +28,9 @@ {% block stylesheets %} - + - + diff --git a/files/templates/CHRISTMAS/sign_up.html b/files/templates/CHRISTMAS/sign_up.html index 3634f56509..90ac9c49f1 100644 --- a/files/templates/CHRISTMAS/sign_up.html +++ b/files/templates/CHRISTMAS/sign_up.html @@ -26,9 +26,9 @@ {% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}Sign up - {{'SITE_NAME' | app_config}}{% endif %} - + - + diff --git a/files/templates/CHRISTMAS/sign_up_failed_ref.html b/files/templates/CHRISTMAS/sign_up_failed_ref.html index 6aee3cfbb4..2d6b961afe 100644 --- a/files/templates/CHRISTMAS/sign_up_failed_ref.html +++ b/files/templates/CHRISTMAS/sign_up_failed_ref.html @@ -31,7 +31,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}{{'SITE_NAME' | app_config}}{% endif %} - + diff --git a/files/templates/CHRISTMAS/tailwind.html b/files/templates/CHRISTMAS/tailwind.html index e3e520504c..dbe67a6ac8 100644 --- a/files/templates/CHRISTMAS/tailwind.html +++ b/files/templates/CHRISTMAS/tailwind.html @@ -5,7 +5,7 @@ - + Flask + Tailwind CSS diff --git a/files/templates/authforms.html b/files/templates/authforms.html index 607565bd29..0e868c3671 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -14,11 +14,11 @@ {% if v %} - + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - + {% endif %} diff --git a/files/templates/default.html b/files/templates/default.html index f18547295e..1a91d77cd2 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -6,12 +6,12 @@ {% if v %} - + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - + {% endif %} diff --git a/files/templates/log.html b/files/templates/log.html index 9b9391981a..c5ecf71515 100644 --- a/files/templates/log.html +++ b/files/templates/log.html @@ -6,11 +6,11 @@ {% block content %} {% if v %} - + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - + {% endif %}
diff --git a/files/templates/login.html b/files/templates/login.html index ad945e3575..dcf5c19966 100644 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -17,7 +17,7 @@ {% endblock %} - + diff --git a/files/templates/login_2fa.html b/files/templates/login_2fa.html index 7a3c08f867..ec2aaf581a 100644 --- a/files/templates/login_2fa.html +++ b/files/templates/login_2fa.html @@ -13,7 +13,7 @@ 2-Step Login - {{'SITE_NAME' | app_config}} - + diff --git a/files/templates/settings.html b/files/templates/settings.html index 2c2541b12c..1a839aa40f 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -33,7 +33,7 @@ - + {% if v.agendaposter %}{% elif v.css %}{% endif %} diff --git a/files/templates/settings2.html b/files/templates/settings2.html index f318e17630..d993886ddb 100644 --- a/files/templates/settings2.html +++ b/files/templates/settings2.html @@ -38,10 +38,10 @@ {% if v %} - + {% else %} - + {% endif %} diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index 6f869f2ed2..5aef16a785 100644 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -30,7 +30,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}Sign up - {{'SITE_NAME' | app_config}}{% endif %} - + diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index abe1f7750b..795db705c1 100644 --- a/files/templates/sign_up_failed_ref.html +++ b/files/templates/sign_up_failed_ref.html @@ -31,7 +31,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}{{'SITE_NAME' | app_config}}{% endif %} - + diff --git a/files/templates/submit.html b/files/templates/submit.html index db1f692561..c93a3133d0 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -25,11 +25,11 @@ {% block stylesheets %} {% if v %} - + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - + {% endif %} {% endblock %} From f06292604a5a6dd50f40a4e9252674d81e640dec Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 21 Dec 2021 10:02:05 +0200 Subject: [PATCH 6/6] fdssfd --- files/routes/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/settings.py b/files/routes/settings.py index 0f79d246d6..c3e048d780 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -52,7 +52,7 @@ def sex(v): users = g.db.query(User).filter(User.patron > 0, User.patron < 5).all() for u in users: - if not u.email or u.email.lower() not in emails: print(u.username + ' - ' + u.email) + if not u.email or u.email.lower() not in emails: print(f'{u.username} - {u.email}') return "sex"