From 8639be4bd49bafe30fd35bfd1582289988877ce9 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 7 Jul 2024 11:31:18 +0200 Subject: [PATCH 1/2] [ticket/17366] Remember confirm code if recaptcha v3 is solved PHPBB-17366 --- phpBB/phpbb/captcha/plugins/recaptcha_v3.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/phpbb/captcha/plugins/recaptcha_v3.php b/phpBB/phpbb/captcha/plugins/recaptcha_v3.php index 6afa18691f7..814b962e31b 100644 --- a/phpBB/phpbb/captcha/plugins/recaptcha_v3.php +++ b/phpBB/phpbb/captcha/plugins/recaptcha_v3.php @@ -359,6 +359,7 @@ protected function recaptcha_verify_token() if ($result->isSuccess()) { $this->solved = true; + $this->confirm_code = $this->code; return false; } From 55dbe070e38674ce36478fdf32ffe9210ee82872 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 7 Jul 2024 14:52:00 +0200 Subject: [PATCH 2/2] [ticket/17366] Remove javascript sanity check as this can break with recaptcha PHPBB-17366 --- phpBB/styles/prosilver/template/ajax.js | 24 ------------------- .../prosilver/template/posting_editor.html | 2 +- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index e01e7eb4d49..dc3f08e4502 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -337,30 +337,6 @@ $('[data-ajax]').each(function() { } }); -// Prevent accidental double submission of form -$('[data-prevent-flood] input[type=submit]').click(function(event) { - const $submitButton = $(this); // Store the button element - const $form = $submitButton.closest('form'); - - // Always add the disabled class for visual feedback - $submitButton.addClass('disabled'); - - // Submit form if it hasn't been submitted yet - if (!$form.prop('data-form-submitted')) { - $form.prop('data-form-submitted', true); - - return; - } - - // Prevent default submission for subsequent clicks within 5 seconds - event.preventDefault(); - - setTimeout(() => { - $form.prop('removeProp', 'data-form-submitted'); - $submitButton.removeClass('disabled'); // Re-enable after 5 seconds - }, 5000); -}); - /** * This simply appends #preview to the action of the * QR action when you click the Full Editor & Preview button diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html index d3b2ecd68ed..12790360d64 100644 --- a/phpBB/styles/prosilver/template/posting_editor.html +++ b/phpBB/styles/prosilver/template/posting_editor.html @@ -100,7 +100,7 @@
-
+
{S_HIDDEN_ADDRESS_FIELD} {S_HIDDEN_FIELDS}