[wp-trac] [WordPress Trac] #32816: No or inadequate Custom Link URL validation

WordPress Trac noreply at wordpress.org
Fri Nov 10 23:42:17 UTC 2017


#32816: No or inadequate Custom Link URL validation
-------------------------------------------------+-------------------------
 Reporter:  JanR                                 |       Owner:
     Type:  defect (bug)                         |  westonruter
 Priority:  normal                               |      Status:  closed
Component:  Customize                            |   Milestone:  4.9
 Severity:  normal                               |     Version:  4.3
 Keywords:  needs-testing has-patch needs-       |  Resolution:  fixed
  screenshots ui-feedback                        |     Focuses:  ui,
                                                 |  javascript
-------------------------------------------------+-------------------------

Comment (by westonruter):

 In [changeset:"42154"]:
 {{{
 #!CommitTicketReference repository="" revision="42154"
 Customize: Restore ability to add Custom Link nav menu items for jump
 links and other URLs that were previously allowed.

 Simplify regular expression for checking URL validity to just do basic
 checks to confirm the value looks like a URL. Leave the complete
 validation to the server-side logic in
 `WP_Customize_Nav_Menu_Item_Setting::sanitize()` to avoid having to
 maintain two separate codebases for validating URLs.

 Props westonruter, SergeyBiryukov for testing.
 Amends [41697].
 See #32816.
 Fixes #42506 for 4.9.
 }}}

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


More information about the wp-trac mailing list