From 5ae6b1ba964e9654a27bfdf1f764c0086443adaf Mon Sep 17 00:00:00 2001 From: Josh Betz Date: Fri, 12 Apr 2019 11:40:58 -0500 Subject: [PATCH] Fix Jetpack SSO Compatibility (#276) Props @joshbetz. --- class.two-factor-core.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class.two-factor-core.php b/class.two-factor-core.php index 664e480c..f54dd009 100644 --- a/class.two-factor-core.php +++ b/class.two-factor-core.php @@ -307,7 +307,7 @@ public static function show_two_factor_login( $user ) { wp_die( esc_html__( 'Failed to create a login nonce.', 'two-factor' ) ); } - $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : $_SERVER['REQUEST_URI']; + $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : admin_url(); self::login_html( $user, $login_nonce['key'], $redirect_to ); }