#62303 closed defect (bug) (fixed)
Use better domain for HTTP API invalid hostname test
Reported by: | sippis | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 6.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | has-patch has-unit-tests commit dev-reviewed |
Focuses: | Cc: |
Description
We use example.com as one of the domains to perform HTTP API tests. That domain is owned and operated by IANA so use of it is ok and safe.
We also use exampleeeee.com, which was not registered until this evening. That domain was used to test if IPv4 cannot be resolved. Now that it's registered and has an A-record, it will resolve and fail tests. Instead of using domain(s) that anyone can register, we should use something reliable — for example, caniload.example.org.
Change History (18)
This ticket was mentioned in PR #7648 on WordPress/wordpress-develop by @sippis.
2 weeks ago
#1
- Keywords has-patch has-unit-tests added
#2
@
13 days ago
- Milestone changed from Awaiting Review to 6.7
Thanks for the ticket and PR Timi. It might be even more preferable to use a .invalid
domain, eg example.invalid
, as they're guaranteed to never resolve.
".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.
Ref: https://datatracker.ietf.org/doc/html/rfc2606#section-2
#4
@
12 days ago
- Keywords commit added
- Severity changed from major to normal
example.invalid
sounds reasonable to me.
#5
@
12 days ago
Apologies I missed this ticket when I opened the duplicate.
To confirm though the fix is tested and works at ClassicPress PR 1613
#6
@
12 days ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 59293:
@SergeyBiryukov commented on PR #7648:
12 days ago
#7
Thanks for the PR! Merged in r59293.
#8
@
12 days ago
- Keywords dev-reviewed added
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for backport to 6.7 branch. Marking dev-reviewed as I'm the second committer signing off on the commit.
This ticket was mentioned in PR #7654 on WordPress/wordpress-develop by @peterwilsoncc.
12 days ago
#10
Invalid URL should be invalid.
Fixes tests for 6.5 and earlier which doesn't include any src changes.
Trac ticket: Core-62303
exampleeeee.com got registered and A-record added so it's not invalid anymore. Example.com is IANA domain and safer to use than some random domain.
Trac ticket: https://core.trac.wordpress.org/ticket/62303