From 9f32a895b5d6fc71881812776ddd5501fc56f828 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Mon, 16 Dec 2019 21:30:07 +0100 Subject: [PATCH 1/2] Fix #15435 - ReCAPTCHA couldn't find user-provided function: Functions.recaptchaCallback Fixes: #15435 Signed-off-by: William Desportes --- js/functions.js | 3 ++- libraries/classes/Plugins/Auth/AuthenticationCookie.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/functions.js b/js/functions.js index ba604f64f0..4d6d441787 100644 --- a/js/functions.js +++ b/js/functions.js @@ -4888,8 +4888,9 @@ Functions.toggleDatepickerIfInvalid = function ($td, $inputField) { /** * Function to submit the login form after validation is done. + * NOTE: do NOT use a module or it will break the callback, issue #15435 */ -Functions.recaptchaCallback = function () { +Functions_recaptchaCallback = function () { $('#login_form').trigger('submit'); }; diff --git a/libraries/classes/Plugins/Auth/AuthenticationCookie.php b/libraries/classes/Plugins/Auth/AuthenticationCookie.php index ef9ca573f1..7a794d09f2 100644 --- a/libraries/classes/Plugins/Auth/AuthenticationCookie.php +++ b/libraries/classes/Plugins/Auth/AuthenticationCookie.php @@ -252,7 +252,7 @@ class AuthenticationCookie extends AuthenticationPlugin , $GLOBALS['lang'] , '" async defer>'; echo ''; + . ' data-callback="Functions_recaptchaCallback" value="' , __('Go') , '" type="submit" id="input_go">'; } $_form_params = []; if (! empty($GLOBALS['target'])) { From 6b564e37803d9d345796669605ebb28dc850ecc8 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Mon, 16 Dec 2019 21:31:05 +0100 Subject: [PATCH 2/2] Add ChangeLog entry for #15435 Signed-off-by: William Desportes --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 442019da67..99b627c5c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -41,6 +41,7 @@ phpMyAdmin - ChangeLog - issue Fixed url.php crashing because it's not loading the DatabaseInterface service - issue #15540 Fixed uncaught TypeError: htmlspecialchars() in NavigationTree - issue Fix twig deprecation notices for php 8.0 +- issue #15435 Fix ReCAPTCHA couldn't find user-provided function: Functions.recaptchaCallback 4.9.3 (not yet released) - issue #15570 Fix page contents go underneath of floating menubar in some cases