summaryrefslogtreecommitdiff
path: root/addons/auth_oauth/controllers
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-01-19 17:15:56 +0100
committerChristophe Simonis <chs@odoo.com>2015-01-19 17:15:56 +0100
commit18e22be138f4d273ce8f63c0ff2c8a437cf6ce5d (patch)
tree63bd658de7b6fa0e91d521ca19322dd68bdc1492 /addons/auth_oauth/controllers
parentf6e5bf847b1a7107c09b009a757823b0f9514fa4 (diff)
parent0aab81cd3ac6881b2b64ccedb901b55badd421d4 (diff)
[MERGE] forward port of branch 8.0 up to 0aab81c
Diffstat (limited to 'addons/auth_oauth/controllers')
-rw-r--r--addons/auth_oauth/controllers/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py
index 55068bf2742..a5c3a3423e5 100644
--- a/addons/auth_oauth/controllers/main.py
+++ b/addons/auth_oauth/controllers/main.py
@@ -70,9 +70,9 @@ class OAuthLogin(Home):
return providers
def get_state(self, provider):
- redirect = request.params.get('redirect', 'web')
+ redirect = request.params.get('redirect') or 'web'
if not redirect.startswith(('//', 'http://', 'https://')):
- redirect = '%s%s' % (request.httprequest.url_root, redirect)
+ redirect = '%s%s' % (request.httprequest.url_root, redirect[1:] if redirect[0] == '/' else redirect)
state = dict(
d=request.session.db,
p=provider['id'],