From ff768827017a4a655c1727597dc6be28e2d72db6 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 7 Apr 2014 17:59:19 +0200 Subject: [PATCH] [FIX] auth_oauth: avoid infinite loop while trying to sign in bzr revid: dle@openerp.com-20140407155919-vm32q6nvcit59026 --- addons/auth_oauth/controllers/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py index fddf439aa1d..08319b982fd 100644 --- a/addons/auth_oauth/controllers/main.py +++ b/addons/auth_oauth/controllers/main.py @@ -2,6 +2,7 @@ import functools import logging import simplejson +import urlparse import werkzeug.utils from werkzeug.exceptions import BadRequest @@ -117,7 +118,8 @@ class OAuthController(http.Controller): menu = state.get('m') redirect = state.get('r') url = '/web' - if redirect: + if redirect and not redirect.startswith('/auth_oauth/signin') and \ + (not redirect.startswith('/web/login') or 'redirect' in urlparse.urlsplit(redirect).query): url = redirect elif action: url = '/web#action=%s' % action