Make WordPress Core

Changeset 59298 for branches/6.6


Ignore:
Timestamp:
10/27/2024 10:32:58 PM (5 weeks ago)
Author:
peterwilsoncc
Message:

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: 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.

Location:
branches/6.6
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/6.6

  • branches/6.6/src/wp-includes/http.php

    r58388 r59298  
    543543 * - http:///example.com/caniload.php - Malformed URL.
    544544 * - http://user:pass@example.com/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:
  • branches/6.6/tests/phpunit/tests/http/http.php

    r57987 r59298  
    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(
Note: See TracChangeset for help on using the changeset viewer.