master
Aevann1 2022-02-28 02:13:07 +02:00
parent b6c341eba6
commit 0995f70eb3
5 changed files with 9 additions and 9 deletions

View File

@ -421,8 +421,8 @@ def award_post(pid, v):
g.db.commit()
if request.referrer and len(request.referrer) > 1:
if request.referrer == f'{SITE_FULL}/submit': return redirect(post.permalink)
elif request.host in request.referrer: return redirect(request.referrer)
return redirect(f"{SITE_FULL}/")
elif request.referrer.startswith(request.host): return redirect(request.referrer)
return redirect(SITE_FULL)
@app.post("/award_comment/<cid>")
@ -646,9 +646,9 @@ def award_comment(cid, v):
g.db.add(author)
g.db.commit()
if request.referrer and len(request.referrer) > 1 and request.host in request.referrer:
if request.referrer and len(request.referrer) > 1 and request.referrer.startswith(request.host):
return redirect(request.referrer)
return redirect(f"{SITE_FULL}/")
return redirect(SITE_FULL)
@app.get("/admin/awards")
@admin_level_required(2)

View File

@ -179,7 +179,7 @@ def sign_up_get(v):
if f.read() == "yes":
return {"error": "New account registration is currently closed. Please come back later."}, 403
if v: return redirect(f"{SITE_FULL}/")
if v: return redirect(SITE_FULL)
agent = request.headers.get("User-Agent", None)
if not agent: abort(403)
@ -350,7 +350,7 @@ def sign_up_post(v):
g.db.commit()
return redirect(f"{SITE_FULL}/")
return redirect(SITE_FULL)
@app.get("/forgot")

View File

@ -737,7 +737,7 @@
{% if v %}
<div id='tax' class="d-none">{% if v.patron or u.patron or v.alts_patron or u.alts_patron %}0{% else %}0.03{% endif %}</div>
<script src="/static/assets/js/userpage_v.js?a=243"></script>
<script src="/static/assets/js/userpage_v.js?a=244"></script>
<div id="username" class="d-none">{{u.username}}</div>
{% endif %}

View File

@ -114,7 +114,7 @@
{% if v %}
<div id='tax' class="d-none">{% if v.patron or u.patron %}0{% else %}0.03{% endif %}</div>
<script src="/static/assets/js/userpage_v.js?a=243"></script>
<script src="/static/assets/js/userpage_v.js?a=244"></script>
<div id="username" class="d-none">{{u.username}}</div>
{% endif %}

View File

@ -48,7 +48,7 @@
{% if v %}
<div id='tax' class="d-none">{% if v.patron or u.patron %}0{% else %}0.03{% endif %}</div>
<script src="/static/assets/js/userpage_v.js?a=243"></script>
<script src="/static/assets/js/userpage_v.js?a=244"></script>
<div id="username" class="d-none">{{u.username}}</div>
{% endif %}