HTTP API: Improve error message to include the blocked URL#9169
HTTP API: Improve error message to include the blocked URL#9169SainathPoojary wants to merge 2 commits intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
pmbaldha
left a comment
There was a problem hiding this comment.
The small changes, but very useful to the Translator.
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
audrasjb
left a comment
There was a problem hiding this comment.
This changeset looks good to me. Marking for commit.
| 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 ) ); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Trac ticket: #45164
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.