[wp-trac] [WordPress Trac] #48955: WP 5.3.1 changes cause potential backwards compatibility breakage with kses

WordPress Trac noreply at wordpress.org
Mon Dec 23 17:28:23 UTC 2019


#48955: WP 5.3.1 changes cause potential backwards compatibility breakage with kses
--------------------------+---------------------
 Reporter:  iCaleb        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.3.3
Component:  Security      |     Version:  5.3.1
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+---------------------

Comment (by jnylen0):

 Passing an array to the kses functions worked previously because it was
 just a chain of `preg_replace_callback` calls, and that function accepts
 either a string or an array.

 The approach that is friendliest to the existing ecosystem would be to add
 unit tests to make sure the KSES functions continue working with an array
 as they have for many years, fix this behavior again in the code, and
 document passing an array as a valid option.

 attachment:48955.test.diff is a first step towards this approach. It is
 still passing against the 4.9 branch.

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


More information about the wp-trac mailing list