[wp-trac] [WordPress Trac] #34538: Improvement of the IPv4 address format check
WordPress Trac
noreply at wordpress.org
Sun Nov 1 13:30:51 UTC 2015
#34538: Improvement of the IPv4 address format check
----------------------------------------------+----------------------------
Reporter: ka2 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: HTTP API | Review
Severity: normal | Version: trunk
Keywords: has-patch needs-unit-tests close | Resolution:
| Focuses:
----------------------------------------------+----------------------------
Changes (by johnbillion):
* keywords: has-patch needs-unit-tests => has-patch needs-unit-tests close
Comment:
This method doesn't validate an IP address, it just checks whether the
passed value looks like an IP address as opposed to a domain name. From
the method's description:
> This does not verify if the IP is a valid IP, only that it appears to be
an IP address.
This method is used in `WP_Http_Streams::verify_ssl_certificate()` to
determine whether the host is an IP address or a domain name. If an
invalid IP address is passed to an HTTP request, then
`WP_Http::is_ip_address()` must still return true otherwise the host will
incorrectly be treated as a domain name. Note that either way, the HTTP
request will fail due to the invalid IP address.
I think this is a wontfix.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34538#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list