diff --git a/apply_patches.sh b/apply_patches.sh index 05afa81..2907790 100755 --- a/apply_patches.sh +++ b/apply_patches.sh @@ -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 diff --git a/patches/20210603_auth-oauth_redirect-to-root.patch b/patches/20210603_auth-oauth_redirect-to-root.patch new file mode 100644 index 0000000..88dd6dd --- /dev/null +++ b/patches/20210603_auth-oauth_redirect-to-root.patch @@ -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(