WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/04/2019 06:13:55 PM (13 months ago)
Author:
desrosj
Message:

Fix for URL sanitization in wp_kses_bad_protocol_once().

Merges [45997] to the 4.9 branch.

Props irsdl, sstoqnov, whyisjake.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/kses.php

    r44020 r46005  
    13851385 */
    13861386function wp_kses_bad_protocol_once($string, $allowed_protocols, $count = 1 ) {
     1387    $string  = preg_replace( '/(&#0*58(?![;0-9])|&#x0*3a(?![;a-f0-9]))/i', '$1;', $string );
    13871388    $string2 = preg_split( '/:|&#0*58;|&#x0*3a;/i', $string, 2 );
    13881389    if ( isset($string2[1]) && ! preg_match('%/\?%', $string2[0]) ) {
Note: See TracChangeset for help on using the changeset viewer.