Skip to content

Commit d3316aa

Browse files
committed
get_home_url() no longer forces 'http'. Only 2 params are passed in so that WordPress can determine the proper scheme to use.
1 parent a00e994 commit d3316aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/class-wp-json-authentication-oauth1.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,12 +522,12 @@ protected function check_oauth_signature( $consumer, $oauth_params, $token = nul
522522
$params = array_merge( $params, $oauth_params );
523523

524524
// Support WP blog roots that point to a folder and not just a domain
525-
$home_url_path = parse_url(get_home_url (null,'','http'), PHP_URL_PATH );
525+
$home_url_path = parse_url(get_home_url (null,''), PHP_URL_PATH );
526526
$request_uri_path = parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH );
527527
if (substr($request_uri_path, 0, strlen($home_url_path)) == $home_url_path) {
528528
$request_uri_path = substr($request_uri_path, strlen($home_url_path));
529529
}
530-
$base_request_uri = rawurlencode( get_home_url( null, $request_uri_path, 'http' ) );
530+
$base_request_uri = rawurlencode( get_home_url( null, $request_uri_path ) );
531531

532532
// get the signature provided by the consumer and remove it from the parameters prior to checking the signature
533533
$consumer_signature = rawurldecode( $params['oauth_signature'] );

0 commit comments

Comments
 (0)