diff --git a/files/routes/comments.py b/files/routes/comments.py index 0ee88bae67..9558700c85 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -800,11 +800,11 @@ def edit_comment(cid, v): body_html = sanitize(body, edit=True) - if v.marseyawarded and marseyaward_body_regex.search(body_html): - return {"error":"You can only type marseys!"}, 403 - if len(body_html) > 20000: abort(400) + if v.marseyawarded and marseyaward_body_regex.search(body_html): + return {"error":"You can only type marseys!"}, 403 + c.body = body[:10000] c.body_html = body_html diff --git a/files/routes/posts.py b/files/routes/posts.py index 79812b5a61..ba364dfb12 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -261,6 +261,10 @@ def post_id(pid, anything=None, v=None, sub=None): @limiter.limit("1/second;30/minute;200/hour;1000/day") @auth_desired def viewmore(v, pid, sort, offset): + pid = int(pid) + post = get_post(pid, v=v) + if post.club and not (v and (v.paid_dues or v.id == post.author_id)): abort(403) + offset = int(offset) try: ids = set(int(x) for x in request.values.get("ids").split(',')) except: abort(400) @@ -341,7 +345,6 @@ def viewmore(v, pid, sort, offset): comments2 = [] count = 0 - post = get_post(pid, v=v) if post.created_utc > 1638672040: for comment in comments: comments2.append(comment) diff --git a/files/templates/authforms.html b/files/templates/authforms.html index b836582153..bf4c40853e 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/chat.html b/files/templates/chat.html index 61b62084b9..62c0ae8df2 100644 --- a/files/templates/chat.html +++ b/files/templates/chat.html @@ -14,7 +14,7 @@ Chat - + {% if v.css %} diff --git a/files/templates/default.html b/files/templates/default.html index 1cc9fd6c45..0396a34b5d 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -7,7 +7,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/log.html b/files/templates/log.html index d75ee136aa..c37084925f 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 d53708e08c..c3fd88ccd0 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 8ffb170f15..731018a13f 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/settings2.html b/files/templates/settings2.html index 34910e89e1..e1e6b560b7 100644 --- a/files/templates/settings2.html +++ b/files/templates/settings2.html @@ -39,10 +39,10 @@ {% if v %} - + {% else %} - + {% endif %} diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index 1a528abf27..6cdc3a1ba1 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 e3217f6c05..e3bf1d995c 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 1f1352023e..b5a58c7974 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -26,7 +26,7 @@ {% block stylesheets %} {% if v %} - + {% if v.agendaposter %} - + {% endif %} {% endblock %}