summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-07-13 16:41:08 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-07-13 16:41:08 -0700
commitcc54c8d549cbe800ecc659c80d58a1fe729c78c9 (patch)
tree31216bb4fdf832e7d67ebb937fb25a4e6d4c41b0 /python/fatcat_web
parentc5a54de229cbbf7f584d8c0ae66c51619d6813e1 (diff)
downloadfatcat-cc54c8d549cbe800ecc659c80d58a1fe729c78c9.tar.gz
fatcat-cc54c8d549cbe800ecc659c80d58a1fe729c78c9.zip
web: fix flask/werkzeug encoding for mediawiki oauth
Diffstat (limited to 'python/fatcat_web')
-rw-r--r--python/fatcat_web/routes.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index 1a573006..144922a8 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -1091,7 +1091,10 @@ def wp_oauth_rewrite():
"""
This is a dirty hack to rewrite '/auth/wikipedia/auth' to '/auth/wikipedia/oauth-callback'
"""
- return redirect(b"/auth/wikipedia/oauth-callback?" + request.query_string, 307)
+ return redirect(
+ (b"/auth/wikipedia/oauth-callback?" + request.query_string).decode('utf-8'),
+ 307,
+ )
@app.route('/auth/wikipedia/finish-login')
def wp_oauth_finish_login():