From 612fd33fb136d41cad6d9f9a10e52fdc6556533d Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 18 May 2018 16:15:55 +0200 Subject: [PATCH] [FIX] http: correct protocol parsing --- openerp/http.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openerp/http.py b/openerp/http.py index c4c1f95fabf..05778f0d290 100644 --- a/openerp/http.py +++ b/openerp/http.py @@ -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")