[wp-trac] [WordPress Trac] #33404: Customizer Menus: Search results can have duplicate items

WordPress Trac noreply at wordpress.org
Fri Oct 23 20:30:08 UTC 2015


#33404: Customizer Menus: Search results can have duplicate items
-------------------------------------+-----------------------------
 Reporter:  valendesigns             |       Owner:  valendesigns
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.3.2
Component:  Customize                |     Version:  4.3
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  administration
-------------------------------------+-----------------------------

Comment (by westonruter):

 Oh, one tiny thing: I think `array_map()` should be used instead of
 `array_filter()` since the latter will not sanitize and could let through
 things unexpectedly. Compare:

 {{{#!php
 <?php
 array_filter( array( '1<script>evil</script>' ), 'absint' ) === array(
 "1<script>evil</script>" );
 }}}

 vs

 {{{#!php
 <?php
 array_map( 'absint', array( '1<script>evil</script>' ) ) === array( 1 );
 }}}

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


More information about the wp-trac mailing list