Make WordPress Core

Changes between Initial Version and Version 9 of Ticket #34202


Ignore:
Timestamp:
10/23/2015 05:18:22 AM (9 years ago)
Author:
dd32
Comment:

Small clarification to the original description - parse_url() cannot handle schemeless IPv6 URLs prior to PHP 5.4.7, http://[...]/ is fine, //[...]/ isn't.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34202

    • Property Keywords has-unit-tests added
  • Ticket #34202 – Description

    initial v9  
    1 In PHP < 5.4.7, `parse_url()` cannot handle IPv6 literal URLs such as `http://[::FFFF::127.0.0.1]/`. This means `esc_url()` cannot correctly handle such URLs because it relies on `parse_url()` to separate the domain/port from the path/query in order to determine whether to encode square brackets or not.
     1In PHP < 5.4.7, `parse_url()` cannot handle IPv6 literal URLs such as `//[::FFFF::127.0.0.1]/`. This means `esc_url()` cannot correctly handle such URLs because it relies on `parse_url()` to separate the domain/port from the path/query in order to determine whether to encode square brackets or not.
    22
    33Prior to [34920], `esc_url()` blindly stripped all square brackets and didn't use `parse_url()`.