[ADD] New patch for OAuth redirect to front page
This commit is contained in:
parent
4d9a132a3b
commit
bb52b60cb7
@ -19,3 +19,11 @@ OPTIONS="--directory=$DEST --strip=1"
|
||||
|
||||
patch $OPTIONS < patches/20210420_auth-oauth-multi-token_error-in-login.patch
|
||||
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
echo " Patch core Odoo modules"
|
||||
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
|
||||
|
||||
DEST=$DESTDIR/core/addons/auth_oauth/
|
||||
OPTIONS="--directory=$DEST --strip=1"
|
||||
|
||||
patch $OPTIONS < patches/20210603_auth-oauth_redirect-to-root.patch
|
||||
|
||||
12
patches/20210603_auth-oauth_redirect-to-root.patch
Normal file
12
patches/20210603_auth-oauth_redirect-to-root.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -rupN auth_oauth/controllers/main.py auth_oauth.patch/controllers/main.py
|
||||
--- auth_oauth/controllers/main.py 2021-04-20 19:22:26.786894865 -0500
|
||||
+++ auth_oauth.patch/controllers/main.py 2021-06-03 21:43:26.020870042 -0500
|
||||
@@ -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(
|
||||
Loading…
Reference in New Issue
Block a user