Replace is_https_url() with 'https' === parse_url( $url, PHP_URL_SCHEME ).

see #28427, #28487.

git-svn-id: https://develop.svn.wordpress.org/trunk@29311 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2014-07-27 17:45:34 +00:00
parent 0f93a72879
commit ea34a0bdf7
3 changed files with 4 additions and 4 deletions

View File

@@ -427,7 +427,7 @@ if ( defined( 'RELOCATE' ) && RELOCATE ) { // Move flag is set
}
//Set a cookie now to see if they are supported by the browser.
$secure = ( is_https_url( home_url() ) && is_https_url( site_url() ) );
$secure = ( 'https' === parse_url( site_url(), PHP_URL_SCHEME ) && 'https' === parse_url( home_url(), PHP_URL_SCHEME ) );
setcookie( TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN, $secure );
if ( SITECOOKIEPATH != COOKIEPATH )
setcookie( TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN, $secure );
@@ -469,7 +469,7 @@ case 'postpass' :
* @param int $expires The expiry time, as passed to setcookie().
*/
$expire = apply_filters( 'post_password_expires', time() + 10 * DAY_IN_SECONDS );
$secure = is_https_url( home_url() );
$secure = ( 'https' === parse_url( home_url(), PHP_URL_SCHEME ) );
setcookie( 'wp-postpass_' . COOKIEHASH, $hasher->HashPassword( wp_unslash( $_POST['post_password'] ) ), $expire, COOKIEPATH, COOKIE_DOMAIN, $secure );
wp_safe_redirect( wp_get_referer() );