Skip to content

Commit b215c59

Browse files
Docs: Further improve the wp_http_validate_url() DocBlock.
Follow-up to [58384]. See #61092. git-svn-id: https://develop.svn.wordpress.org/trunk@58388 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 7cf81d3 commit b215c59

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/wp-includes/http.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -539,15 +539,17 @@ function send_origin_headers() {
539539
*
540540
* Examples of URLs that are considered unsafe:
541541
*
542-
* - ftp://example.com/caniload.php (Invalid protocol - Only http and https are allowed)
543-
* - http:///example.com/caniload.php (Malformed URL)
544-
* - http://user:[email protected]/caniload.php (Login information)
545-
* - http://exampleeeee.com/caniload.php (Invalid hostname, as the IP cannot be looked up in DNS)
542+
* - ftp://example.com/caniload.php - Invalid protocol - only http and https are allowed.
543+
* - http:///example.com/caniload.php - Malformed URL.
544+
* - http://user:[email protected]/caniload.php - Login information.
545+
* - http://exampleeeee.com/caniload.php - Invalid hostname, as the IP cannot be looked up in DNS.
546546
*
547-
* Examples of URLS that are considered unsafe by default:
547+
* Examples of URLs that are considered unsafe by default:
548548
*
549-
* - http://192.168.0.1/caniload.php (IPs from LAN networks. This can be changed with the Wordpress filter http_request_host_is_external)
550-
* - http://198.143.164.252:81/caniload.php (By default, only 80, 443 and 8080 are allowed. This can be changed with the Wordpress filter http_allowed_safe_ports)
549+
* - http://192.168.0.1/caniload.php - IPs from LAN networks.
550+
* This can be changed with the {@see 'http_request_host_is_external'} filter.
551+
* - http://198.143.164.252:81/caniload.php - By default, only 80, 443, and 8080 ports are allowed.
552+
* This can be changed with the {@see 'http_allowed_safe_ports'} filter.
551553
*
552554
* @since 3.5.2
553555
*

0 commit comments

Comments
 (0)