WordPress.org

Make WordPress Core

Ticket #4690: 4690.diff

File 4690.diff, 563 bytes (added by Nazgul, 12 years ago)
  • wp-includes/functions.php

     
    179179
    180180function get_option($setting) {
    181181        global $wpdb;
     182       
     183        $setting = $wpdb->escape($setting);
    182184
    183185        // Allow plugins to short-circuit options.
    184186        $pre = apply_filters( 'pre_option_' . $setting, false );
     
    364366
    365367function delete_option($name) {
    366368        global $wpdb;
     369       
     370        $name = $wpdb->escape($name);
    367371
    368372        wp_protect_special_option($name);
    369373