Skip to content

Commit ee5bd55

Browse files
committed
Tests: Use better domain for HTTP API invalid hostname test.
The previous domain that was used to test for a host whose IPv4 address cannot be resolved, `exampleeeee.com`, got registered and has an A-record now, so it's not invalid anymore. `.invalid` is intended for use in online construction of domain names that are sure to be invalid and which it is obvious at a glance are invalid. Reference: [https://datatracker.ietf.org/doc/html/rfc2606#section-2 Reserved Top Level DNS Names: TLDs for Testing, & Documentation Examples]. Follow-up to [52084], [58384], [58388]. Reviewed by peterwilsoncc. Merges [59293] to the 6.6 branch. Props sippis, johnbillion, MattyRob, swissspidy, SergeyBiryukov. Fixes #62303. git-svn-id: https://develop.svn.wordpress.org/branches/6.6@59298 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 126e3bc commit ee5bd55

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/wp-includes/http.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ function send_origin_headers() {
542542
* - ftp://example.com/caniload.php - Invalid protocol - only http and https are allowed.
543543
* - http:///example.com/caniload.php - Malformed URL.
544544
* - 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.
545+
* - http://example.invalid/caniload.php - Invalid hostname, as the IP cannot be looked up in DNS.
546546
*
547547
* Examples of URLs that are considered unsafe by default:
548548
*

tests/phpunit/tests/http/http.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ public function data_wp_http_validate_url_should_not_validate() {
549549
'url' => 'http://[exam]ple.com/caniload.php',
550550
),
551551
'a host whose IPv4 address cannot be resolved' => array(
552-
'url' => 'http://exampleeeee.com/caniload.php',
552+
'url' => 'http://example.invalid/caniload.php',
553553
),
554554
'an external request when not allowed' => array(
555555
'url' => 'http://192.168.0.1/caniload.php',

0 commit comments

Comments
 (0)