From 38e3f47b8b0425ffe40dacb182fc1c68123775e3 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 23 Dec 2024 17:23:21 +0100 Subject: [PATCH] Fix the validation of reCAPTCHA in dialogs See https://www.woltlab.com/community/thread/310067-gastkommentar-absenden-noch-immer-nicht-m%C3%B6glich/ --- com.woltlab.wcf/templates/shared_recaptcha.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/com.woltlab.wcf/templates/shared_recaptcha.tpl b/com.woltlab.wcf/templates/shared_recaptcha.tpl index ed73e39c9e..bebd82322a 100644 --- a/com.woltlab.wcf/templates/shared_recaptcha.tpl +++ b/com.woltlab.wcf/templates/shared_recaptcha.tpl @@ -111,7 +111,7 @@ WCF.recaptcha.queue.push({ bucket: 'recaptchaBucket{$recaptchaBucketID}' {if $ajaxCaptcha|isset && $ajaxCaptcha} - , ajaxCaptcha: '{$captchaID}' + , ajaxCaptcha: '{unsafe:$captchaID|encodeJS}' {/if} }); @@ -186,7 +186,7 @@ if (WCF.recaptcha.callbackCalled) setTimeout(recaptchaCallback, 1); {if $ajaxCaptcha|isset && $ajaxCaptcha} - WCF.System.Captcha.addCallback('{$captchaID}', function() { + WCF.System.Captcha.addCallback('{unsafe:$captchaID|encodeJS}', function() { return { 'g-recaptcha-response': grecaptcha.getResponse(WCF.recaptcha.mapping['recaptchaBucket{$recaptchaBucketID}']), 'type': 'v2' -- 2.20.1