odoo14-dev-environment/patches/20210603_auth-oauth_redirects-to-root.patch

14 lines
640 B
Diff

diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py
index 3d1a6b53..dd8006c6 100644
--- a/addons/auth_oauth/controllers/main.py
+++ b/addons/auth_oauth/controllers/main.py
@@ -70,7 +70,7 @@ class OAuthLogin(Home):
return providers
def get_state(self, provider):
- redirect = request.params.get('redirect') or 'web'
+ redirect = request.params.get('redirect') or '/'
if not redirect.startswith(('//', 'http://', 'https://')):
redirect = '%s%s' % (request.httprequest.url_root, redirect[1:] if redirect[0] == '/' else redirect)
state = dict(