|
1 | 1 | <?php |
2 | 2 | /** |
3 | | - * Two Factore Core Class. |
| 3 | + * Two Factor Core Class. |
4 | 4 | * |
5 | 5 | * @package Two_Factor |
6 | 6 | */ |
@@ -1479,7 +1479,7 @@ public static function _login_form_validate_2fa( $user, $nonce = '', $provider = |
1479 | 1479 | // Validate the request. |
1480 | 1480 | if ( true !== self::verify_login_nonce( $user->ID, $nonce ) ) { |
1481 | 1481 | wp_safe_redirect( home_url() ); |
1482 | | - return; |
| 1482 | + exit(); |
1483 | 1483 | } |
1484 | 1484 |
|
1485 | 1485 | $provider = self::get_provider_for_user( $user, $provider ); |
@@ -1567,6 +1567,7 @@ public static function _login_form_validate_2fa( $user, $nonce = '', $provider = |
1567 | 1567 |
|
1568 | 1568 | $redirect_to = apply_filters( 'login_redirect', $redirect_to, $redirect_to, $user ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Core WordPress filter. |
1569 | 1569 | wp_safe_redirect( $redirect_to ); |
| 1570 | + exit(); |
1570 | 1571 | } |
1571 | 1572 |
|
1572 | 1573 |
|
@@ -1602,15 +1603,15 @@ public static function login_form_revalidate_2fa() { |
1602 | 1603 | public static function _login_form_revalidate_2fa( $nonce = '', $provider = '', $redirect_to = '', $is_post_request = false ) { |
1603 | 1604 | if ( ! is_user_logged_in() ) { |
1604 | 1605 | wp_safe_redirect( home_url() ); |
1605 | | - return; |
| 1606 | + exit(); |
1606 | 1607 | } |
1607 | 1608 |
|
1608 | 1609 | $user = wp_get_current_user(); |
1609 | 1610 |
|
1610 | 1611 | // Validate the nonce for POST requests. GET requests do not perform actions, and such do not require the nonce (such as the initial request). |
1611 | 1612 | if ( $is_post_request && ! wp_verify_nonce( $nonce, 'two_factor_revalidate_' . $user->ID ) ) { |
1612 | 1613 | wp_safe_redirect( home_url() ); |
1613 | | - return; |
| 1614 | + exit(); |
1614 | 1615 | } |
1615 | 1616 |
|
1616 | 1617 | $provider = self::get_provider_for_user( $user, $provider ); |
@@ -1665,7 +1666,7 @@ public static function _login_form_revalidate_2fa( $nonce = '', $provider = '', |
1665 | 1666 |
|
1666 | 1667 | $redirect_to = apply_filters( 'login_redirect', $redirect_to, $redirect_to, $user ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Core WordPress filter. |
1667 | 1668 | wp_safe_redirect( $redirect_to ); |
1668 | | - return; |
| 1669 | + exit(); |
1669 | 1670 | } |
1670 | 1671 |
|
1671 | 1672 | /** |
|
0 commit comments