From 7d476512b86f10407bbab4ebb2be311d0eba7e3a Mon Sep 17 00:00:00 2001 From: std-odoo Date: Wed, 14 Jul 2021 11:44:09 +0000 Subject: [PATCH] [FIX] mail_plugin: fix an error during the authentication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug === Since 478068c82999eaf77fd2b68659bb3fb3d3c2872f we wanted to use the Odoo redirection function everywhere. But this function work only if we redirect the user to the same site. The mail plugin need to redirect outside of Odoo and so we can not use this function. closes odoo/odoo#73698 Signed-off-by: Jérémy Kersten (jke) --- addons/mail_plugin/controllers/authenticate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail_plugin/controllers/authenticate.py b/addons/mail_plugin/controllers/authenticate.py index fd18b2d444b..292f1416f05 100644 --- a/addons/mail_plugin/controllers/authenticate.py +++ b/addons/mail_plugin/controllers/authenticate.py @@ -50,7 +50,7 @@ class Authenticate(http.Controller): else: params.update({'success': 0, 'state': kw.get('state', '')}) updated_redirect = parsed_redirect.replace(query=werkzeug.urls.url_encode(params)) - return request.redirect(updated_redirect.to_url()) + return request.redirect(updated_redirect.to_url(), local=False) # In this case, an exception will be thrown in case of preflight request if only POST is allowed. @http.route(['/mail_client_extension/auth/access_token', '/mail_plugin/auth/access_token'], type='json', auth="none", cors="*",