From a27ecb41890c87334a904cd42d3a15485e75fbca Mon Sep 17 00:00:00 2001 From: Benoit Socias Date: Wed, 2 Dec 2020 07:26:49 +0000 Subject: [PATCH] [FIX] website_mass_mailing: use the correct action to obtain token MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit the "subscribe to newsletter" form was using the action of the website form to obtain its reCaptcha token, while the validation of the token was done on a specific subscribe action. After this commit the "subscribe to newsletter" form is using its own action that matches the one used for validation. Fixes https://github.com/odoo/odoo/issues/62504 closes odoo/odoo#62728 X-original-commit: 82b06dc4c3df502c8e006169f4ee0f6aa33e3ac1 Signed-off-by: Jérémy Kersten (jke) --- .../website_mass_mailing/static/src/js/website_mass_mailing.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_mass_mailing/static/src/js/website_mass_mailing.js b/addons/website_mass_mailing/static/src/js/website_mass_mailing.js index 3503204db9d..b4b07d64476 100644 --- a/addons/website_mass_mailing/static/src/js/website_mass_mailing.js +++ b/addons/website_mass_mailing/static/src/js/website_mass_mailing.js @@ -79,7 +79,7 @@ publicWidget.registry.subscribe = publicWidget.Widget.extend({ return false; } this.$target.removeClass('o_has_error').find('.form-control').removeClass('is-invalid'); - const tokenObj = await this._recaptcha.getToken('website_form'); + const tokenObj = await this._recaptcha.getToken('website_mass_mailing_subscribe'); if (tokenObj.error) { self.displayNotification({ type: 'danger',