Make WordPress Core

Ticket #19354: 19354.2.patch

File 19354.2.patch, 1.1 KB (added by kurtpayne, 12 years ago)

Adding ini_set for pcre backtrack limit

  • wp-includes/functions.php

     /**
     
    46664666        static $protocols;
    46674667
    46684668        if ( empty( $protocols ) ) {
    4669                 $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn' );
     4669                $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'data' );
    46704670                $protocols = apply_filters( 'kses_allowed_protocols', $protocols );
    46714671        }
    46724672
  • wp-includes/kses.php

     
    13521352 * @since 2.0.0
    13531353 */
    13541354function kses_init() {
     1355       
     1356        $backtrack_limit = ini_get('pcre.backtrack_limit');
     1357        if ( false === $backtrack_limit || $backtrack_limit  < 1000000 )
     1358                ini_set( 'pcre.backtrack_limit', 1000000 );
     1359
    13551360        kses_remove_filters();
    13561361
    13571362        if (current_user_can('unfiltered_html') == false)