Make WordPress Core

Changeset 63063


Ignore:
Timestamp:
08/06/2026 03:33:27 PM (2 months ago)
Author:
johnbillion
Message:

Formatting: Prevent stack overflow in safecss_filter_attr.

Props xknown, vortfu, westonruter, dmsnell, jorbin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/kses.php

    r62850 r63063  
    30103010                        );
    30113011
     3012                        // Bail if the recursive function stripping hit a PCRE error (e.g. stack/backtrack limit).
     3013                        if ( null === $css_test_string ) {
     3014                                continue;
     3015                        }
     3016
    30123017                        /*
    30133018                         * Disallow CSS containing \ ( & } = or comments, except for within url(), var(), calc(), etc.
    30143019                         * which were removed from the test string above.
    30153020                         */
    3016                         $allow_css = ! preg_match( '%[\\\(&=}]|/\*%', $css_test_string );
     3021                        $allow_css = 0 === preg_match( '%[\\\(&=}]|/\*%', $css_test_string );
    30173022
    30183023                        /**
Note: See TracChangeset for help on using the changeset viewer.