WordPress.org

Make WordPress Core

Ticket #18323: 18323.2.patch

File 18323.2.patch, 459 bytes (added by SergeyBiryukov, 19 months ago)
  • wp-admin/includes/misc.php

     
    325325                $option = $_POST['wp_screen_options']['option']; 
    326326                $value = $_POST['wp_screen_options']['value']; 
    327327 
    328                 if ( !preg_match( '/^[a-z_-]+$/', $option ) ) 
     328                if ( $option != sanitize_key( $option ) ) 
    329329                        return; 
    330330 
    331331                $map_option = $option;