[wp-trac] [WordPress Trac] #15936: IPv6 literal support in multisite broken
WordPress Trac
noreply at wordpress.org
Wed Jan 10 22:51:23 UTC 2018
#15936: IPv6 literal support in multisite broken
------------------------------------+-----------------------------
Reporter: jmdh | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Permalinks | Version: 3.0
Severity: major | Resolution:
Keywords: has-patch dev-feedback | Focuses: multisite
------------------------------------+-----------------------------
Changes (by enrico.sorcinelli):
* type: defect (bug) => enhancement
Comment:
I added here the #42993 patch since it works for me also with IPv6 literal
addresses (I tested for example with ''!http://[::1]:8001'' in my
multisite installation).
The original patch is out of date since the ''wp-includes/ms-
settings.php'' has changed and there is no more `wp_die()` statement (it
has moved into ''wp-admin/includes/network.php'' where I added the filter
below).
The proposal patch adds `allowed_multisite_ports` new filter that allows
to define differents ports in Multisite installs other than `80` and
`443`. For example:
{{{
add_filter( 'allowed_multisite_ports', function( $ports ) {
$ports[] = ':8000';
return $ports;
} );
}}}
I thought it was better to explicitly add differents ports instead of
allow differents ports by default (or by defining constant like `define(
'MULTISITE_ALLOW_DIFFERENT_PORTS', true )`).
PS: Currently I used filter for `sanitize_user()` (used in
`wpmu_create_blog()`) in order to allow ports in domain string, even if
the best way would be to add a `sanitize_domain()` dedicated function
since the first one allows also underscores.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/15936#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list