From e8e9e23e76be17a51629175cbf8875725425ff49 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Mon, 1 May 2023 12:42:49 +0300 Subject: [PATCH] - fixed error class vulnerability; --- includes/core/um-actions-login.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/core/um-actions-login.php b/includes/core/um-actions-login.php index c960a81d..3c4ae9b7 100644 --- a/includes/core/um-actions-login.php +++ b/includes/core/um-actions-login.php @@ -71,7 +71,7 @@ function um_submit_form_errors_hook_login( $args ) { if ( ! empty( $third_party_codes ) && in_array( $user->get_error_code(), $third_party_codes ) ) { UM()->form()->add_error( $user->get_error_code(), $user->get_error_message() ); } else { - UM()->form()->add_error( $user->get_error_code(), __( 'Password is incorrect. Please try again.', 'ultimate-member' ) ); + UM()->form()->add_error( 'user_password', __( 'Password is incorrect. Please try again.', 'ultimate-member' ) ); } } @@ -80,7 +80,7 @@ function um_submit_form_errors_hook_login( $args ) { if ( ! empty( $third_party_codes ) && in_array( $user->get_error_code(), $third_party_codes ) ) { UM()->form()->add_error( $user->get_error_code(), $user->get_error_message() ); } else { - UM()->form()->add_error( $user->get_error_code(), __( 'Password is incorrect. Please try again.', 'ultimate-member' ) ); + UM()->form()->add_error( 'user_password', __( 'Password is incorrect. Please try again.', 'ultimate-member' ) ); } }