diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-07-13 16:41:08 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-07-13 16:41:08 -0700 |
commit | cc54c8d549cbe800ecc659c80d58a1fe729c78c9 (patch) | |
tree | 31216bb4fdf832e7d67ebb937fb25a4e6d4c41b0 /python/fatcat_web/routes.py | |
parent | c5a54de229cbbf7f584d8c0ae66c51619d6813e1 (diff) | |
download | fatcat-cc54c8d549cbe800ecc659c80d58a1fe729c78c9.tar.gz fatcat-cc54c8d549cbe800ecc659c80d58a1fe729c78c9.zip |
web: fix flask/werkzeug encoding for mediawiki oauth
Diffstat (limited to 'python/fatcat_web/routes.py')
-rw-r--r-- | python/fatcat_web/routes.py | 5 |
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(): |