master
Aevann1 2022-04-04 22:53:37 +02:00
parent 97ed5c8f3b
commit 8ad6fd509f
12 changed files with 22 additions and 19 deletions

View File

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

View File

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

View File

@ -15,7 +15,7 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=205"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=40">
<link rel="stylesheet" href="/assets/css/main.css?v=206"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=40">
{% if v.agendaposter %}
<style>
html {
@ -39,7 +39,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=205"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=40">
<link rel="stylesheet" href="/assets/css/main.css?v=206"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=40">
{% endif %}
</head>

View File

@ -14,7 +14,7 @@
<title>Chat</title>
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=205">
<link rel="stylesheet" href="/assets/css/main.css?v=206">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=40">
{% if v.css %}
<link rel="stylesheet" href="/@{{v.username}}/css">

View File

@ -7,7 +7,7 @@
<script src="/assets/js/bootstrap.js?v=245"></script>
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=205">
<link rel="stylesheet" href="/assets/css/main.css?v=206">
<link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=40">
{% if v.agendaposter %}
<style>
@ -32,7 +32,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=205">
<link rel="stylesheet" href="/assets/css/main.css?v=206">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=40">
{% endif %}

View File

@ -6,7 +6,7 @@
{% block content %}
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=205"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=40">
<link rel="stylesheet" href="/assets/css/main.css?v=206"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=40">
{% if v.agendaposter %}
<style>
html {
@ -30,7 +30,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=205"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=40">
<link rel="stylesheet" href="/assets/css/main.css?v=206"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=40">
{% endif %}
<div class="row justify-content-around">

View File

@ -18,7 +18,7 @@
{% endblock %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=205">
<link rel="stylesheet" href="/assets/css/main.css?v=206">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=40">
</head>

View File

@ -14,7 +14,7 @@
<title>2-Step Login - {{SITE_NAME}}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=205"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=40">
<link rel="stylesheet" href="/assets/css/main.css?v=206"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=40">
</head>

View File

@ -39,10 +39,10 @@
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=205"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=40">
<link rel="stylesheet" href="/assets/css/main.css?v=206"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=40">
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=205"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=40">
<link rel="stylesheet" href="/assets/css/main.css?v=206"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=40">
{% endif %}
</head>

View File

@ -31,7 +31,7 @@
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=205"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=40">
<link rel="stylesheet" href="/assets/css/main.css?v=206"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=40">
</head>

View File

@ -32,7 +32,7 @@
<title>{% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %}</title>
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=205"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=40">
<link rel="stylesheet" href="/assets/css/main.css?v=206"><link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=40">
</head>

View File

@ -26,7 +26,7 @@
{% block stylesheets %}
{% if v %}
<style>:root{--primary:#{{v.themecolor}}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=205"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=40">
<link rel="stylesheet" href="/assets/css/main.css?v=206"><link rel="stylesheet" href="/assets/css/{{v.theme}}.css?v=40">
{% if v.agendaposter %}
<style>
html {
@ -50,7 +50,7 @@
{% endif %}
{% else %}
<style>:root{--primary:#{{config('DEFAULT_COLOR')}}</style>
<link rel="stylesheet" href="/assets/css/main.css?v=205">
<link rel="stylesheet" href="/assets/css/main.css?v=206">
<link rel="stylesheet" href="/assets/css/{{config('DEFAULT_THEME')}}.css?v=40">
{% endif %}
{% endblock %}