[wp-trac] [WordPress Trac] #40353: Site URL and Home URL inputs are not properly validating

WordPress Trac noreply at wordpress.org
Tue May 2 07:31:06 UTC 2017


#40353: Site URL and Home URL inputs are not properly validating
----------------------------------------+------------------------------
 Reporter:  subrataemfluence            |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Options, Meta APIs          |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  good-first-bug needs-patch  |     Focuses:  administration
----------------------------------------+------------------------------

Comment (by shulard):

 You are right, `parse_url` doesn't validate the URL it analyze the
 different parts and extract them inside an array, it's why I validated
 array keys and values.

 The regex used seems very complicated due to IPv6 support but it's more
 accurate regarding validation. I'll take a look to add some unit tests on
 your function :)

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


More information about the wp-trac mailing list