Skip to content
Snippets Groups Projects
Commit 612fd33f authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[FIX] http: correct protocol parsing

parent 866d1e71
Branches
Tags
No related merge requests found
......@@ -160,6 +160,7 @@ def redirect_with_hash(url, code=303):
# See extensive test page at http://greenbytes.de/tech/tc/httpredirects/
if request.httprequest.user_agent.browser in ('firefox',):
return werkzeug.utils.redirect(url, code)
url = url.strip()
if urlparse.urlparse(url, scheme='http').scheme not in ('http', 'https'):
url = 'http://' + url
url = url.replace("'", "%27").replace("<", "%3C")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment