summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiLEE <lilee115@users.noreply.github.com>2020-10-25 21:42:01 +0000
committerLiLEE <lilee115@users.noreply.github.com>2020-10-26 19:34:59 +0000
commitf29a625857128617c2d4d795e648d5ad1f7ab8a4 (patch)
tree0f01a99f3ccb34a1877745f688b1557fb2c7ec66
parent54ef98c613219aba3bda41817f7767261b8092d2 (diff)
[FIX] google_recaptcha: take argument 'action' into effect
Take argument _action_ of method _verify_request_recaptcha_token into effect. Otherwise it always sends 'website_form' as recaptcha action to google recaptcha service to verify the token, this would lead to failure. closes odoo/odoo#60684 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
-rw-r--r--addons/google_recaptcha/models/ir_http.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/google_recaptcha/models/ir_http.py b/addons/google_recaptcha/models/ir_http.py
index 59dbfd14c96..f0306cb175a 100644
--- a/addons/google_recaptcha/models/ir_http.py
+++ b/addons/google_recaptcha/models/ir_http.py
@@ -21,7 +21,7 @@ class Http(models.AbstractModel):
"""
ip_addr = request.httprequest.remote_addr
token = request.params.pop('recaptcha_token_response', False)
- recaptcha_result = request.env['ir.http']._verify_recaptcha_token(ip_addr, token, 'website_form')
+ recaptcha_result = request.env['ir.http']._verify_recaptcha_token(ip_addr, token, action)
if recaptcha_result in ['is_human', 'no_secret']:
return True
if recaptcha_result == 'wrong_secret':