From e79cb58b7269cb6327340876320eca031e0a21b4 Mon Sep 17 00:00:00 2001
From: Aevann1
Date: Fri, 23 Jul 2021 22:37:33 +0200
Subject: [PATCH] fd
---
drama/routes/posts.py | 22 +---------------------
drama/routes/users.py | 2 +-
drama/templates/2fa_modal.html | 1 +
3 files changed, 3 insertions(+), 22 deletions(-)
diff --git a/drama/routes/posts.py b/drama/routes/posts.py
index 38163bede..fb04b2193 100644
--- a/drama/routes/posts.py
+++ b/drama/routes/posts.py
@@ -45,7 +45,7 @@ def resize():
print(f"2 {u.profileurl}")
-@app.route("/banaward/post/", methods=["POST", "GET"])
+@app.route("/banaward/post/")
@auth_required
def postbanaward(post_id, v):
@@ -103,30 +103,10 @@ def submit_get(v):
b=b
)
-@app.route("/post_short/", methods=["GET"])
-@app.route("/post_short/", methods=["GET"])
-@app.route("/post_short//", methods=["GET"])
-def incoming_post_shortlink(base36id=None):
-
- if not base36id:
- return redirect('/')
-
- if base36id == "robots.txt":
- return redirect('/robots.txt')
-
- try:
- x=base36decode(base36id)
- except:
- abort(400)
-
- post = get_post(base36id)
- return redirect(post.permalink)
-
@app.route("/post/", methods=["GET"])
@app.route("/post//", methods=["GET"])
@app.route("/post//", methods=["GET"])
@app.route("/api/v1/post/", methods=["GET"])
-@app.route("/test/post/", methods=["GET"])
@auth_desired
@api("read")
def post_base36id(pid, anything=None, v=None):
diff --git a/drama/routes/users.py b/drama/routes/users.py
index 62bb78997..04217b36f 100644
--- a/drama/routes/users.py
+++ b/drama/routes/users.py
@@ -137,7 +137,7 @@ def mfa_qr(secret, v):
error_correction=qrcode.constants.ERROR_CORRECT_L
)
qr.add_data(x.provisioning_uri(v.username, issuer_name="Drama"))
- img = qr.make_image(fill_color="#FF66AC", back_color="white")
+ img = qr.make_image(fill_color="#000000", back_color="white")
mem = io.BytesIO()
diff --git a/drama/templates/2fa_modal.html b/drama/templates/2fa_modal.html
index 3aa05f0c1..135d8f287 100644
--- a/drama/templates/2fa_modal.html
+++ b/drama/templates/2fa_modal.html
@@ -20,6 +20,7 @@
![](/2faqr/{{mfa_secret}})
+
Or enter this code: {{mfa_secret}}