Make WordPress Core

Opened 7 years ago

Closed 2 weeks ago

#45164 closed enhancement (fixed)

Added URL to error blocked requests

Reported by: wiuempe's profile wiuempe Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 7.0 Priority: normal
Severity: normal Version: 5.1
Component: HTTP API Keywords: has-patch commit
Focuses: Cc:

Description

Hello, i have set in wp-config.php:

define( 'WP_HTTP_BLOCK_EXTERNAL', true );
define( 'WP_ACCESSIBLE_HOSTS', 'api.wordpress.org,downloads.wordpress.org' );

When i installed plugin which need make request, i have error: "User has blocked requests through HTTP.". If i want to add this host to whitelist, i dont know which host i should add, so i change error communicate to print URL.

Attachments (1)

mypatch.diff (583 bytes) - added by wiuempe 7 years ago.

Download all attachments as: .zip

Change History (12)

@wiuempe
7 years ago

#1 @SergeyBiryukov
7 years ago

  • Milestone changed from Awaiting Review to 5.1
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#2 @pento
7 years ago

  • Keywords needs-refresh added
  • Milestone changed from 5.1 to Future Release

Thank you for this ticket, @wiuempe!

Could you please update the patch to user sprintf() to insert the URL in the string?

#3 @maltfield
2 years ago

+1. Any status on this? I also use WP_HTTP_BLOCK_EXTERNAL, and it would be great if the logs would include the URL so that we could know which plugins/themes are making unwanted calls to their mothership.

This ticket was mentioned in PR #9169 on WordPress/wordpress-develop by @sainathpoojary.


8 months ago
#4

  • Keywords needs-refresh removed

Trac ticket: #45164

@pmbaldha commented on PR #9169:


8 months ago
#5

Nice! It looks good to me. Thanks!

@pmbaldha commented on PR #9169:


8 months ago
#6

Nice! It looks good to me. Thanks!

#7 @SergeyBiryukov
4 months ago

  • Milestone changed from Future Release to 7.0

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


4 weeks ago

#9 @audrasjb
4 weeks ago

  • Keywords commit added

I refreshed the PR against trunk.
Marking this as ready for commit.

#10 @audrasjb
2 weeks ago

Self assigning for final commit as we're getting close to beta 1.

#11 @audrasjb
2 weeks ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 61706:

HTTP API: Improve error message to include the blocked URL.

This changeset adds the URL of the blocked HTTP request in http_request_not_executed.

Props wiuempe, pento, maltfield, sainathpoojary, pmbaldha, mukesh27, johnbillion.
Fixes #45164.

Note: See TracTickets for help on using tickets.