Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/wp-includes/class-wp-http.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ public function request( $url, $args = array() ) {
}

if ( $this->block_request( $url ) ) {
$response = new WP_Error( 'http_request_not_executed', __( 'User has blocked requests through HTTP.' ) );
/* translators: %s: URL to which the HTTP request was blocked. */
$response = new WP_Error( 'http_request_not_executed', sprintf( __( 'User has blocked requests through HTTP to the URL: %s.' ), $url ) );
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick question: does exposing the full URL introduce any security concerns? I’m not aware of any specific issues, but it came to mind during the review.

cc: @johnbillion

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially an edge case concern if the URL contains a sensitive query parameter and the failure message gets logged somewhere, but I think the benefit outweighs this concern.

/** This action is documented in wp-includes/class-wp-http.php */
do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
return $response;
Expand Down
Loading