From b3f196b324138240fe3c41ca97dff8d66ea5d356 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 4 Mar 2022 20:07:34 +0200 Subject: [PATCH 1/4] zzz --- 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 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/files/templates/authforms.html b/files/templates/authforms.html index 9472c6b4b..4c64a4236 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -15,7 +15,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/default.html b/files/templates/default.html index ac4f64a5b..293fb763f 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -7,7 +7,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} {% if sub and sub.css and not request.path.endswith('settings') %} diff --git a/files/templates/log.html b/files/templates/log.html index 2474f30f2..cc90411b5 100644 --- a/files/templates/log.html +++ b/files/templates/log.html @@ -6,7 +6,7 @@ {% block content %} {% if v %} - + {% if v.agendaposter %} - + {% endif %}
diff --git a/files/templates/login.html b/files/templates/login.html index 33a087f6f..e6323128a 100644 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -18,7 +18,7 @@ {% endblock %} - + diff --git a/files/templates/login_2fa.html b/files/templates/login_2fa.html index b713a023b..244f190c5 100644 --- a/files/templates/login_2fa.html +++ b/files/templates/login_2fa.html @@ -14,7 +14,7 @@ 2-Step Login - {{SITE_NAME}} - + diff --git a/files/templates/settings.html b/files/templates/settings.html index 8c0309ab9..341714375 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -34,7 +34,7 @@ - + {% if v.agendaposter %} - + {% else %} - + {% endif %} diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index 95e29da81..3ff182359 100644 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -31,7 +31,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %} - + diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index ef40dcdf4..cfa085f1c 100644 --- a/files/templates/sign_up_failed_ref.html +++ b/files/templates/sign_up_failed_ref.html @@ -32,7 +32,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %} - + diff --git a/files/templates/submit.html b/files/templates/submit.html index f076c45ec..999deb3e2 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -26,7 +26,7 @@ {% block stylesheets %} {% if v %} - + {% if v.agendaposter %} - + {% endif %} {% endblock %} From d6aa08fcf6afbf1decdd3722b8d942d0b738992a Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 4 Mar 2022 20:19:43 +0200 Subject: [PATCH 2/4] sub --- files/templates/sub/create_sub.html | 4 ++-- files/templates/sub/mods.html | 2 +- files/templates/submit.html | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/files/templates/sub/create_sub.html b/files/templates/sub/create_sub.html index 660bd5627..42b6974ae 100644 --- a/files/templates/sub/create_sub.html +++ b/files/templates/sub/create_sub.html @@ -29,8 +29,8 @@ - - Names must be 3-20 characters + + 3-20 characters, including letters, numbers, _ , and -
diff --git a/files/templates/sub/mods.html b/files/templates/sub/mods.html index 67ceccfa7..9d83d2b0e 100644 --- a/files/templates/sub/mods.html +++ b/files/templates/sub/mods.html @@ -37,7 +37,7 @@ {% if v.mods(sub.name) %}
- +
{% endif %} diff --git a/files/templates/submit.html b/files/templates/submit.html index 999deb3e2..df15a4e94 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -88,8 +88,10 @@ {% endfor %} + - +
WARNING: selecting a sub considerably limits the number of people who will see your post. Don't select a sub unless that's what you want.
+ From 02462f583333c77ceb5b37f8e87b762df222c709 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 4 Mar 2022 22:42:28 +0200 Subject: [PATCH 3/4] testicles --- files/routes/comments.py | 2 +- files/routes/front.py | 10 +++++----- files/templates/emoji_modal.html | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 1a8519500..98372e9ab 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -274,7 +274,7 @@ def api_comment(v): return {"error": "Invalid name!"}, 403 if "author" in marsey: author_id = get_user(marsey["author"]).id - elif "author_id" in marsey: author_id = marsey["author_id"] + elif "author_id" in marsey: author_id = int(marsey["author_id"]) else: abort(400) existing = g.db.query(Marsey.name).filter_by(name=name).one_or_none() diff --git a/files/routes/front.py b/files/routes/front.py index a220124d2..f0bccdfbc 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -131,13 +131,13 @@ def notifications(v): ) -@app.get("/") -@app.get("/logged_out") -@app.get("/s/") -@app.get("/logged_out/s/") +@app.get("/", subdomain="") +@app.get("/logged_out", subdomain="") +@app.get("/s/", subdomain="") +@app.get("/logged_out/s/", subdomain="") @limiter.limit("3/second;30/minute;1000/hour;5000/day") @auth_desired -def front_all(v, sub=None): +def front_all(v, sub=None, subdomain=None): if sub: sub = g.db.query(Sub).filter_by(name=sub.strip().lower()).one_or_none() if request.path.startswith('/s/') and not sub: abort(404) diff --git a/files/templates/emoji_modal.html b/files/templates/emoji_modal.html index 3d1725f01..d94d16bb1 100644 --- a/files/templates/emoji_modal.html +++ b/files/templates/emoji_modal.html @@ -94,4 +94,4 @@ - \ No newline at end of file + \ No newline at end of file From e3a0875ef3b2a63a53648d51babcd96e2a1a9cf6 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 4 Mar 2022 22:58:45 +0200 Subject: [PATCH 4/4] castle --- files/routes/front.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/files/routes/front.py b/files/routes/front.py index f0bccdfbc..c4a103037 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -131,10 +131,10 @@ def notifications(v): ) -@app.get("/", subdomain="") -@app.get("/logged_out", subdomain="") -@app.get("/s/", subdomain="") -@app.get("/logged_out/s/", subdomain="") +@app.get("/") +@app.get("/logged_out") +@app.get("/s/") +@app.get("/logged_out/s/") @limiter.limit("3/second;30/minute;1000/hour;5000/day") @auth_desired def front_all(v, sub=None, subdomain=None):