[wp-trac] [WordPress Trac] #34202: esc_url() cannot handle IPv6 literal URLs in PHP < 5.4.7
WordPress Trac
noreply at wordpress.org
Tue Oct 20 06:23:35 UTC 2015
#34202: esc_url() cannot handle IPv6 literal URLs in PHP < 5.4.7
----------------------------------------+------------------------------
Reporter: johnbillion | Owner:
Type: defect (bug) | Status: new
Priority: low | Milestone: Awaiting Review
Component: Formatting | Version: 3.1
Severity: normal | Resolution:
Keywords: needs-patch has-unit-tests | Focuses:
----------------------------------------+------------------------------
Comment (by swissspidy):
Replying to [comment:4 dd32]:
> Replying to [comment:3 swissspidy]:
> > `esc_url` also breaks when an IPv6 address is used in a query arg,
e.g. `http://example.org/?s=2001:0db8:0000:0000:0000:ff00:0042:8329`. It
just returns an empty string in that case.
>
> I can't duplicate that under Trunk, does this also require the specific
version of PHP?
Just noticed that this happens when using a relative URL like `edit-
comments.php?s=2001:0db8:0000:0000:0000:ff00:0042:8329`. In ''that'' case
`esc_url()` returns an empty string. Not for `edit-
comments.php?s=192.168.50.1` however. That works as expected.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34202#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list