summaryrefslogtreecommitdiff
path: root/addons/auth_oauth/controllers
diff options
context:
space:
mode:
authorKersten Jeremy <jke@openerp.com>2014-02-27 14:07:05 +0100
committerKersten Jeremy <jke@openerp.com>2014-02-27 14:07:05 +0100
commit49a92c376aa3405cf0c836fdaab07ec69d73b647 (patch)
tree86b2b4b7b0ff9abfc3b02af0efc3e11bff11fb82 /addons/auth_oauth/controllers
parente28677f727b0218f037417d912f42a143c5bc52c (diff)
[FIX] Fix loop when parse hash into get param with no hash
bzr revid: jke@openerp.com-20140227130705-jlvl157aio3o4df3
Diffstat (limited to 'addons/auth_oauth/controllers')
-rw-r--r--addons/auth_oauth/controllers/main.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py
index 53a6ffd5462..4d96f083cdc 100644
--- a/addons/auth_oauth/controllers/main.py
+++ b/addons/auth_oauth/controllers/main.py
@@ -15,6 +15,7 @@ from openerp.tools.translate import _
_logger = logging.getLogger(__name__)
+
#----------------------------------------------------------
# helpers
#----------------------------------------------------------
@@ -30,11 +31,15 @@ def fragment_to_query_string(func):
var s = l.search ? (l.search === '?' ? '' : '&') : '?';
r = l.pathname + l.search + s + q;
}
+ if (r == l) {
+ r = '/';
+ }
window.location = r;
</script></head><body></body></html>"""
return func(self, *a, **kw)
return wrapper
+
#----------------------------------------------------------
# Controller
#----------------------------------------------------------
@@ -88,6 +93,7 @@ class OAuthLogin(openerp.addons.web.controllers.main.Home):
return response
+
class OAuthController(http.Controller):
@http.route('/auth_oauth/signin', type='http', auth='none')