[wp-trac] [WordPress Trac] #34538: Improvement of the IPv4 address format check

WordPress Trac noreply at wordpress.org
Sun Nov 1 10:03:58 UTC 2015


#34538: Improvement of the IPv4 address format check
----------------------------------------+------------------------------
 Reporter:  ka2                         |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  HTTP API                    |     Version:  trunk
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+------------------------------
Changes (by GaryJ):

 * keywords:   => has-patch needs-unit-tests


Comment:

 Hello ka2, welcome to Trac. Thank you for your ticket and patch.

 A couple of things about your patch to consider:

 * Only the last hunk is important here - all the rest are un-related
 whitespace fixes. Try and keep to fixes just in the immediate function
 you're changing - in this case, adding the non-optional braces for the
 `if` that you're amending.
 * This is going to need unit tests to show that `999.1.1.1` and other
 similarly broken IPv4 address potentials are no longer valid. If unit
 tests for correct IP addresses, these should be added too.

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


More information about the wp-trac mailing list