[wp-trac] [WordPress Trac] #41083: IP with port number triggers warnings in WP_Community_Events

WordPress Trac noreply at wordpress.org
Fri Oct 13 01:09:32 UTC 2017


#41083: IP with port number triggers warnings in WP_Community_Events
--------------------------------------+-----------------------------
 Reporter:  EatonZ                    |       Owner:  iandunn
     Type:  defect (bug)              |      Status:  assigned
 Priority:  normal                    |   Milestone:  4.9
Component:  Administration            |     Version:  4.8
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  administration
--------------------------------------+-----------------------------

Comment (by dd32):

 While I'm not sure of the back-history of that particular decision, it
 seems to be erring on the better side of UX. In that scenario I'm fine
 with it sending the original full IP personally.

 That being said, I'm curious if we shouldn't just short-circuit the
 function for IPv4 addresses and use direct string manipulation, to avoid
 those kind of issues. (if 4 occurrences of `.`, strip anything
 before/after the ip, replace 4th octet with `0`).
 Parsing IPv6 like that would be far more complicated, and I kind of expect
 the functions would be more likely available in those scenario's, based on
 ipv6 being used by more modern installs of PHP.. hopefully :)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41083#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list