Make WordPress Core


Ignore:
Timestamp:
12/12/2019 06:51:11 PM (6 years ago)
Author:
whyisjake
Message:

Ensure that a user can publish_posts before making a post sticky.
Props: danielbachhuber, whyisjake, peterwilson, xknown.
Prevent stored XSS through wp_targeted_link_rel().
Props: vortfu, whyisjake, peterwilsoncc, xknown, SergeyBiryukov, flaviozavan.
Update wp_kses_bad_protocol() to recognize : on uri attributes,
wp_kses_bad_protocol() makes sure to validate that uri attributes don't contain invalid/or not allowed protocols. While this works fine in most cases, there's a risk that by using the colon html5 named entity, one is able to bypass this function.
Brings r46895 to the 5.3 branch.
Props: xknown, nickdaugherty, peterwilsoncc.
Prevent stored XSS in the block editor.
Brings r46896 to the 5.3 branch.
Prevent escaped unicode characters become unescaped in unsafe HTML during JSON decoding.
Props: aduth, epiqueras.

Location:
branches/5.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0

  • branches/5.0/src/wp-includes/default-filters.php

    r43930 r46915  
    225225
    226226// Misc filters
    227 add_filter( 'option_ping_sites',        'privacy_ping_filter'                 );
    228 add_filter( 'option_blog_charset',      '_wp_specialchars'                    ); // IMPORTANT: This must not be wp_specialchars() or esc_html() or it'll cause an infinite loop
    229 add_filter( 'option_blog_charset',      '_canonical_charset'                  );
    230 add_filter( 'option_home',              '_config_wp_home'                     );
    231 add_filter( 'option_siteurl',           '_config_wp_siteurl'                  );
    232 add_filter( 'tiny_mce_before_init',     '_mce_set_direction'                  );
    233 add_filter( 'teeny_mce_before_init',    '_mce_set_direction'                  );
    234 add_filter( 'pre_kses',                 'wp_pre_kses_less_than'               );
    235 add_filter( 'sanitize_title',           'sanitize_title_with_dashes',   10, 3 );
    236 add_action( 'check_comment_flood',      'check_comment_flood_db',       10, 4 );
    237 add_filter( 'comment_flood_filter',     'wp_throttle_comment_flood',    10, 3 );
    238 add_filter( 'pre_comment_content',      'wp_rel_nofollow',              15    );
    239 add_filter( 'comment_email',            'antispambot'                         );
    240 add_filter( 'option_tag_base',          '_wp_filter_taxonomy_base'            );
    241 add_filter( 'option_category_base',     '_wp_filter_taxonomy_base'            );
    242 add_filter( 'the_posts',                '_close_comments_for_old_posts', 10, 2);
    243 add_filter( 'comments_open',            '_close_comments_for_old_post', 10, 2 );
    244 add_filter( 'pings_open',               '_close_comments_for_old_post', 10, 2 );
    245 add_filter( 'editable_slug',            'urldecode'                           );
    246 add_filter( 'editable_slug',            'esc_textarea'                        );
    247 add_filter( 'nav_menu_meta_box_object', '_wp_nav_menu_meta_box_object'        );
    248 add_filter( 'pingback_ping_source_uri', 'pingback_ping_source_uri'            );
    249 add_filter( 'xmlrpc_pingback_error',    'xmlrpc_pingback_error'               );
    250 add_filter( 'title_save_pre',           'trim'                                );
     227add_filter( 'option_ping_sites', 'privacy_ping_filter' );
     228add_filter( 'option_blog_charset', '_wp_specialchars' ); // IMPORTANT: This must not be wp_specialchars() or esc_html() or it'll cause an infinite loop
     229add_filter( 'option_blog_charset', '_canonical_charset' );
     230add_filter( 'option_home', '_config_wp_home' );
     231add_filter( 'option_siteurl', '_config_wp_siteurl' );
     232add_filter( 'tiny_mce_before_init', '_mce_set_direction' );
     233add_filter( 'teeny_mce_before_init', '_mce_set_direction' );
     234add_filter( 'pre_kses', 'wp_pre_kses_less_than' );
     235add_filter( 'pre_kses', 'wp_pre_kses_block_attributes', 10, 3 );
     236add_filter( 'sanitize_title', 'sanitize_title_with_dashes', 10, 3 );
     237add_action( 'check_comment_flood', 'check_comment_flood_db', 10, 4 );
     238add_filter( 'comment_flood_filter', 'wp_throttle_comment_flood', 10, 3 );
     239add_filter( 'pre_comment_content', 'wp_rel_nofollow', 15 );
     240add_filter( 'comment_email', 'antispambot' );
     241add_filter( 'option_tag_base', '_wp_filter_taxonomy_base' );
     242add_filter( 'option_category_base', '_wp_filter_taxonomy_base' );
     243add_filter( 'the_posts', '_close_comments_for_old_posts', 10, 2 );
     244add_filter( 'comments_open', '_close_comments_for_old_post', 10, 2 );
     245add_filter( 'pings_open', '_close_comments_for_old_post', 10, 2 );
     246add_filter( 'editable_slug', 'urldecode' );
     247add_filter( 'editable_slug', 'esc_textarea' );
     248add_filter( 'nav_menu_meta_box_object', '_wp_nav_menu_meta_box_object' );
     249add_filter( 'pingback_ping_source_uri', 'pingback_ping_source_uri' );
     250add_filter( 'xmlrpc_pingback_error', 'xmlrpc_pingback_error' );
     251add_filter( 'title_save_pre', 'trim' );
    251252
    252253add_action( 'transition_comment_status', '_clear_modified_cache_on_transition_comment_status', 10, 2 );
Note: See TracChangeset for help on using the changeset viewer.