Code Duplication    Length = 9-9 lines in 2 locations

src/wp-includes/pluggable.php 2 locations

@@ 1003-1011 (lines=9) @@
1000
	$secure = apply_filters( 'secure_auth_redirect', $secure );
1001
1002
	// If https is required and request is http, redirect
1003
	if ( $secure && !is_ssl() && false !== strpos($_SERVER['REQUEST_URI'], 'wp-admin') ) {
1004
		if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
1005
			wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
1006
			exit();
1007
		} else {
1008
			wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
1009
			exit();
1010
		}
1011
	}
1012
1013
	/**
1014
	 * Filters the authentication redirect scheme.
@@ 1033-1041 (lines=9) @@
1030
		do_action( 'auth_redirect', $user_id );
1031
1032
		// If the user wants ssl but the session is not ssl, redirect.
1033
		if ( !$secure && get_user_option('use_ssl', $user_id) && false !== strpos($_SERVER['REQUEST_URI'], 'wp-admin') ) {
1034
			if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
1035
				wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
1036
				exit();
1037
			} else {
1038
				wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
1039
				exit();
1040
			}
1041
		}
1042
1043
		return;  // The cookie is good so we're done
1044
	}