Skip to content

Commit

Permalink
Don't escape the translation when passing it to WP_Error to avoid pot…
Browse files Browse the repository at this point in the history
…ential double-escapes.
  • Loading branch information
dd32 authored Oct 17, 2022
1 parent dd91216 commit 8aa3d78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion class-two-factor-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ public static function login_form_validate_2fa() {

// Ask the provider to verify the second factor.
if ( true !== $provider->validate_authentication( $user ) ) {
do_action( 'wp_login_failed', $user->user_login, new WP_Error( 'two_factor_invalid', esc_html__( 'ERROR: Invalid verification code.', 'two-factor' ) ) );
do_action( 'wp_login_failed', $user->user_login, new WP_Error( 'two_factor_invalid', __( 'ERROR: Invalid verification code.', 'two-factor' ) ) );

$login_nonce = self::create_login_nonce( $user->ID );
if ( ! $login_nonce ) {
Expand Down

0 comments on commit 8aa3d78

Please sign in to comment.