Make WordPress Core

Changeset 6083


Ignore:
Timestamp:
09/11/2007 08:24:42 PM (19 years ago)
Author:
ryan
Message:

Fix option sanitization slashing. fixes #4949 for 2.2

Location:
branches/2.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/wp-admin/options.php

    r5915 r6083  
    3030                foreach ($options as $option) {
    3131                        $option = trim($option);
    32                         $value = trim($_POST[$option]);
    33                         $value = sanitize_option($option, $value); // This does stripslashes on those that need it
     32                        $value = $_POST[$option];
     33                        if(!is_array($value))   $value = trim($value);
     34                        $value = stripslashes_deep($value);
    3435                        update_option($option, $value);
    3536                }
  • branches/2.2/wp-includes/functions.php

    r5830 r6083  
    311311
    312312        $safe_option_name = $wpdb->escape($option_name);
     313        $newvalue = sanitize_option($option_name, $newvalue);
    313314
    314315        if ( is_string($newvalue) )
Note: See TracChangeset for help on using the changeset viewer.