PluginProbe
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP / 1.2.77
UsersWP – Front-end login form, User Registration, User Profile & Members Directory plugin for WP v1.2.77
1.2.77 1.2.76 1.2.75 1.2.74 1.2.73 1.2.72 1.2.71 1.2.70 1.2.69 1.2.68 1.2.67 1.2.66 1.2.65 1.2.64 1.2.63 trunk 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 All 177 releases
← All changes | includes/class-forms.php +5 -5 1.2.76 → 1.2.77 View file →
@@ -1695,9 +1695,9 @@
1695 1695
1696 1696 $code = isset( $_POST['authcode'] ) ? sanitize_text_field( wp_unslash( $_POST['authcode'] ) ) : '';
1697 1697
1698 1698 if ( empty( $code ) || true !== \WordfenceLS\Controller_TOTP::shared()->validate_2fa( $user, $code ) ) {
1699 - do_action( 'wp_login_failed', $user->user_login );
1699 + do_action( 'wp_login_failed', $user->user_login, new WP_Error( 'invalid_2fa_code', __( 'Invalid verification code.', 'userswp' ) ) );
1700 1700
1701 1701 $message = aui()->alert(
1702 1702 array(
1703 1703 'type' => 'error',
@@ -1784,9 +1784,9 @@
1784 1784 $error = $e->getMessage();
1785 1785 }
1786 1786
1787 1787 if ( $error ) {
1788 - do_action( 'wp_login_failed', $user->user_login );
1788 + do_action( 'wp_login_failed', $user->user_login, new WP_Error( 'invalid_2fa', $error ) );
1789 1789
1790 1790 $message = aui()->alert(
1791 1791 array(
1792 1792 'type' => 'error',
@@ -1803,9 +1803,9 @@
1803 1803 }
1804 1804
1805 1805 // Validate TOTP.
1806 1806 if ( 'totp' === $provider && true !== $this->validate_wp2fa_totp_authentication( $user ) ) {
1807 - do_action( 'wp_login_failed', $user->user_login );
1807 + do_action( 'wp_login_failed', $user->user_login, new WP_Error( 'invalid_2fa_code', __( 'Invalid verification code.', 'userswp' ) ) );
1808 1808
1809 1809 $message = aui()->alert(
1810 1810 array(
1811 1811 'type' => 'error',
@@ -1817,9 +1817,9 @@
1817 1817 }
1818 1818
1819 1819 // Validate Email.
1820 1820 if ( 'email' === $provider && true !== $this->validate_wp2fa_email_authentication( $user ) ) {
1821 - do_action( 'wp_login_failed', $user->user_login );
1821 + do_action( 'wp_login_failed', $user->user_login, new WP_Error( 'invalid_2fa_code', __( 'Invalid verification code.', 'userswp' ) ) );
1822 1822
1823 1823 if ( isset( $_REQUEST['wp-2fa-email-code-resend'] ) && 1 == $_REQUEST['wp-2fa-email-code-resend'] ) {
1824 1824 $message = aui()->alert(
1825 1825 array(
@@ -1842,9 +1842,9 @@
1842 1842 }
1843 1843
1844 1844 // Backup Codes.
1845 1845 if ( 'backup_codes' === $provider && true !== $this->validate_wp2fa_backup_codes( $user ) ) {
1846 - do_action( 'wp_login_failed', $user->user_login );
1846 + do_action( 'wp_login_failed', $user->user_login, new WP_Error( 'invalid_2fa_code', __( 'Invalid verification code.', 'userswp' ) ) );
1847 1847
1848 1848 $message = aui()->alert(
1849 1849 array(
1850 1850 'type' => 'error',