Changeset 23567
- Timestamp:
- 03/01/2013 05:14:09 PM (12 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-comments.php
r23563 r23567 21 21 22 22 if ( 'delete_all' == $doaction && !empty( $_REQUEST['pagegen_timestamp'] ) ) { 23 $comment_status = $_REQUEST['comment_status'];24 $delete_time = $_REQUEST['pagegen_timestamp'];23 $comment_status = wp_unslash( $_REQUEST['comment_status'] ); 24 $delete_time = wp_unslash ( $_REQUEST['pagegen_timestamp'] ); 25 25 $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_approved = %s AND %s > comment_date_gmt", $comment_status, $delete_time ) ); 26 26 $doaction = 'delete'; -
trunk/wp-admin/includes/template.php
r23554 r23567 1334 1334 */ 1335 1335 function _admin_search_query() { 1336 echo isset($_REQUEST['s']) ? esc_attr( stripslashes( $_REQUEST['s'] ) ) : '';1336 echo isset($_REQUEST['s']) ? esc_attr( wp_unslash( $_REQUEST['s'] ) ) : ''; 1337 1337 } 1338 1338 -
trunk/wp-admin/includes/theme-install.php
r23554 r23567 51 51 */ 52 52 function install_theme_search_form( $type_selector = true ) { 53 $type = isset( $_REQUEST['type'] ) ? stripslashes( $_REQUEST['type'] ) : 'term';54 $term = isset( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : '';53 $type = isset( $_REQUEST['type'] ) ? wp_unslash( $_REQUEST['type'] ) : 'term'; 54 $term = isset( $_REQUEST['s'] ) ? wp_unslash( $_REQUEST['s'] ) : ''; 55 55 if ( ! $type_selector ) 56 56 echo '<p class="install-help">' . __( 'Search for themes by keyword.' ) . '</p>'; … … 180 180 global $tab, $themes_allowedtags, $wp_list_table; 181 181 182 $theme = themes_api( 'theme_information', array( 'slug' => stripslashes( $_REQUEST['theme'] ) ) );182 $theme = themes_api( 'theme_information', array( 'slug' => wp_unslash( $_REQUEST['theme'] ) ) ); 183 183 184 184 if ( is_wp_error( $theme ) ) -
trunk/wp-admin/includes/upgrade.php
r23554 r23567 133 133 134 134 if ( empty($first_post) ) 135 $first_post = stripslashes( __( 'Welcome to <a href="SITE_URL">SITE_NAME</a>. This is your first post. Edit or delete it, then start blogging!' ));135 $first_post = __( 'Welcome to <a href="SITE_URL">SITE_NAME</a>. This is your first post. Edit or delete it, then start blogging!' ); 136 136 137 137 $first_post = str_replace( "SITE_URL", esc_url( network_home_url() ), $first_post ); … … 637 637 foreach ( $users as $user ) : 638 638 if ( !empty( $user->user_firstname ) ) 639 update_user_meta( $user->ID, 'first_name', $wpdb->escape($user->user_firstname) );639 update_user_meta( $user->ID, 'first_name', wp_slash($user->user_firstname) ); 640 640 if ( !empty( $user->user_lastname ) ) 641 update_user_meta( $user->ID, 'last_name', $wpdb->escape($user->user_lastname) );641 update_user_meta( $user->ID, 'last_name', wp_slash($user->user_lastname) ); 642 642 if ( !empty( $user->user_nickname ) ) 643 update_user_meta( $user->ID, 'nickname', $wpdb->escape($user->user_nickname) );643 update_user_meta( $user->ID, 'nickname', wp_slash($user->user_nickname) ); 644 644 if ( !empty( $user->user_level ) ) 645 645 update_user_meta( $user->ID, $wpdb->prefix . 'user_level', $user->user_level ); 646 646 if ( !empty( $user->user_icq ) ) 647 update_user_meta( $user->ID, 'icq', $wpdb->escape($user->user_icq) );647 update_user_meta( $user->ID, 'icq', wp_slash($user->user_icq) ); 648 648 if ( !empty( $user->user_aim ) ) 649 update_user_meta( $user->ID, 'aim', $wpdb->escape($user->user_aim) );649 update_user_meta( $user->ID, 'aim', wp_slash($user->user_aim) ); 650 650 if ( !empty( $user->user_msn ) ) 651 update_user_meta( $user->ID, 'msn', $wpdb->escape($user->user_msn) );651 update_user_meta( $user->ID, 'msn', wp_slash($user->user_msn) ); 652 652 if ( !empty( $user->user_yim ) ) 653 update_user_meta( $user->ID, 'yim', $wpdb->escape($user->user_icq) );653 update_user_meta( $user->ID, 'yim', wp_slash($user->user_icq) ); 654 654 if ( !empty( $user->user_description ) ) 655 update_user_meta( $user->ID, 'description', $wpdb->escape($user->user_description) );655 update_user_meta( $user->ID, 'description', wp_slash($user->user_description) ); 656 656 657 657 if ( isset( $user->user_idmode ) ): … … 855 855 $cat_id = (int) $category->cat_id; 856 856 $term_id = 0; 857 $name = $wpdb->escape($category->cat_name);857 $name = wp_slash($category->cat_name); 858 858 $slug = sanitize_title($name); 859 859 $term_group = 0; -
trunk/wp-admin/includes/user.php
r23554 r23567 35 35 $user->ID = (int) $user_id; 36 36 $userdata = get_userdata( $user_id ); 37 $user->user_login = $wpdb->escape( $userdata->user_login );37 $user->user_login = wp_slash( $userdata->user_login ); 38 38 } else { 39 39 $update = false; -
trunk/wp-admin/install.php
r23554 r23567 85 85 $blog_public = isset( $_POST['blog_public'] ); 86 86 87 $weblog_title = isset( $_POST['weblog_title'] ) ? trim( stripslashes( $_POST['weblog_title'] ) ) : '';88 $user_name = isset($_POST['user_name']) ? trim( stripslashes( $_POST['user_name'] ) ) : 'admin';89 $admin_password = isset($_POST['admin_password']) ? trim( stripslashes( $_POST['admin_password'] ) ) : '';90 $admin_email = isset( $_POST['admin_email'] ) ? trim( stripslashes( $_POST['admin_email'] ) ) : '';87 $weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : ''; 88 $user_name = isset($_POST['user_name']) ? trim( wp_unslash( $_POST['user_name'] ) ) : 'admin'; 89 $admin_password = isset($_POST['admin_password']) ? trim( wp_unslash( $_POST['admin_password'] ) ) : ''; 90 $admin_email = isset( $_POST['admin_email'] ) ? trim( wp_unslash( $_POST['admin_email'] ) ) : ''; 91 91 92 92 if ( ! is_null( $error ) ) { … … 190 190 display_header(); 191 191 // Fill in the data we gathered 192 $weblog_title = isset( $_POST['weblog_title'] ) ? trim( stripslashes( $_POST['weblog_title'] ) ) : '';193 $user_name = isset($_POST['user_name']) ? trim( stripslashes( $_POST['user_name'] ) ) : 'admin';194 $admin_password = isset($_POST['admin_password']) ? $_POST['admin_password']: '';195 $admin_password_check = isset($_POST['admin_password2']) ? $_POST['admin_password2']: '';196 $admin_email = isset( $_POST['admin_email'] ) ?trim( stripslashes( $_POST['admin_email'] ) ) : '';192 $weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : ''; 193 $user_name = isset($_POST['user_name']) ? trim( wp_unslash( $_POST['user_name'] ) ) : 'admin'; 194 $admin_password = isset($_POST['admin_password']) ? wp_unslash( $_POST['admin_password'] ) : ''; 195 $admin_password_check = isset($_POST['admin_password2']) ? wp_unslash( $_POST['admin_password2'] ) : ''; 196 $admin_email = isset( $_POST['admin_email'] ) ?trim( wp_unslash( $_POST['admin_email'] ) ) : ''; 197 197 $public = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : 0; 198 198 // check e-mail address -
trunk/wp-admin/link-manager.php
r23554 r23567 32 32 } 33 33 } elseif ( ! empty( $_GET['_wp_http_referer'] ) ) { 34 wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), stripslashes( $_SERVER['REQUEST_URI'] ) ) );34 wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); 35 35 exit; 36 36 } … … 73 73 <h2><?php echo esc_html( $title ); ?> <a href="link-add.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'link'); ?></a> <?php 74 74 if ( !empty($_REQUEST['s']) ) 75 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( stripslashes($_REQUEST['s']) ) ); ?>75 printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( wp_unslash($_REQUEST['s']) ) ); ?> 76 76 </h2> 77 77 -
trunk/wp-admin/network.php
r23554 r23567 521 521 $subdomain_install = allow_subdomain_install() ? !empty( $_POST['subdomain_install'] ) : false; 522 522 if ( ! network_domain_check() ) { 523 $result = populate_network( 1, get_clean_basedomain(), sanitize_email( $_POST['email'] ), stripslashes( $_POST['sitename'] ), $base, $subdomain_install );523 $result = populate_network( 1, get_clean_basedomain(), sanitize_email( $_POST['email'] ), wp_unslash( $_POST['sitename'] ), $base, $subdomain_install ); 524 524 if ( is_wp_error( $result ) ) { 525 525 if ( 1 == count( $result->get_error_codes() ) && 'no_wildcard_dns' == $result->get_error_code() ) -
trunk/wp-admin/network/site-info.php
r23554 r23567 63 63 64 64 // update blogs table 65 $blog_data = stripslashes_deep( $_POST['blog'] );65 $blog_data = wp_unslash( $_POST['blog'] ); 66 66 $existing_details = get_blog_details( $id, false ); 67 67 $blog_data_checkboxes = array( 'public', 'archived', 'spam', 'mature', 'deleted' ); -
trunk/wp-admin/network/site-new.php
r23554 r23567 89 89 90 90 Address: %2$s 91 Name: %3$s' ), $current_user->user_login , get_site_url( $id ), stripslashes( $title ) );91 Name: %3$s' ), $current_user->user_login , get_site_url( $id ), wp_unslash( $title ) ); 92 92 wp_mail( get_site_option('admin_email'), sprintf( __( '[%s] New Site Created' ), $current_site->site_name ), $content_mail, 'From: "Site Admin" <' . get_site_option( 'admin_email' ) . '>' ); 93 93 wpmu_welcome_notification( $id, $user_id, $password, $title, array( 'public' => 1 ) ); -
trunk/wp-admin/network/site-settings.php
r23554 r23567 54 54 $skip_options = array( 'allowedthemes' ); // Don't update these options since they are handled elsewhere in the form. 55 55 foreach ( (array) $_POST['option'] as $key => $val ) { 56 $key = wp_unslash( $key ); 57 $val = wp_unslash( $val ); 56 58 if ( $key === 0 || is_array( $val ) || in_array($key, $skip_options) ) 57 59 continue; // Avoids "0 is a protected WP option and may not be modified" error when edit blog options 58 60 if ( $c == $count ) 59 update_option( $key, stripslashes( $val ));61 update_option( $key, $val ); 60 62 else 61 update_option( $key, stripslashes( $val ), false ); // no need to refresh blog details yet63 update_option( $key, $val, false ); // no need to refresh blog details yet 62 64 $c++; 63 65 } -
trunk/wp-admin/network/sites.php
r23554 r23567 80 80 <input type="hidden" name="_wp_http_referer" value="<?php echo esc_attr( wp_get_referer() ); ?>" /> 81 81 <?php wp_nonce_field( $_GET['action2'], '_wpnonce', false ); ?> 82 <p><?php echo esc_html( stripslashes( $_GET['msg'] ) ); ?></p>82 <p><?php echo esc_html( wp_unslash( $_GET['msg'] ) ); ?></p> 83 83 <?php submit_button( __('Confirm'), 'button' ); ?> 84 84 </form> -
trunk/wp-admin/options-head.php
r23554 r23567 3 3 * WordPress Options Header. 4 4 * 5 * Resets variables: 'action', 'standalone', and 'option_group_id'. Displays 6 * updated message, if updated variable is part of the URL query. 5 * Displays updated message, if updated variable is part of the URL query. 7 6 * 8 7 * @package WordPress -
trunk/wp-admin/options.php
r23554 r23567 121 121 if ( is_multisite() && ! is_super_admin() ) 122 122 wp_die( __( 'You do not have sufficient permissions to modify unregistered settings for this site.' ) ); 123 $options = explode( ',', stripslashes( $_POST[ 'page_options' ] ) );123 $options = explode( ',', wp_unslash( $_POST[ 'page_options' ] ) ); 124 124 } else { 125 125 $options = $whitelist_options[ $option_page ]; … … 128 128 // Handle custom date/time formats 129 129 if ( 'general' == $option_page ) { 130 if ( !empty($_POST['date_format']) && isset($_POST['date_format_custom']) && '\c\u\s\t\o\m' == stripslashes( $_POST['date_format'] ) )130 if ( !empty($_POST['date_format']) && isset($_POST['date_format_custom']) && '\c\u\s\t\o\m' == wp_unslash( $_POST['date_format'] ) ) 131 131 $_POST['date_format'] = $_POST['date_format_custom']; 132 if ( !empty($_POST['time_format']) && isset($_POST['time_format_custom']) && '\c\u\s\t\o\m' == stripslashes( $_POST['time_format'] ) )132 if ( !empty($_POST['time_format']) && isset($_POST['time_format_custom']) && '\c\u\s\t\o\m' == wp_unslash( $_POST['time_format'] ) ) 133 133 $_POST['time_format'] = $_POST['time_format_custom']; 134 134 // Map UTC+- timezones to gmt_offsets and set timezone_string to empty. … … 151 151 if ( ! is_array( $value ) ) 152 152 $value = trim( $value ); 153 $value = stripslashes_deep( $value );153 $value = wp_unslash( $value ); 154 154 } 155 155 update_option( $option, $value ); -
trunk/wp-admin/plugin-editor.php
r23554 r23567 29 29 30 30 if ( isset($_REQUEST['file']) ) 31 $plugin = stripslashes($_REQUEST['file']);31 $plugin = wp_unslash($_REQUEST['file']); 32 32 33 33 if ( empty($plugin) ) { … … 40 40 if ( empty($file) ) 41 41 $file = $plugin_files[0]; 42 else43 $file = stripslashes($file);44 42 45 43 $file = validate_file_to_edit($file, $plugin_files); … … 53 51 check_admin_referer('edit-plugin_' . $file); 54 52 55 $newcontent = stripslashes($_POST['newcontent']);53 $newcontent = wp_unslash( $_POST['newcontent'] ); 56 54 if ( is_writeable($real_file) ) { 57 55 $f = fopen($real_file, 'w+'); -
trunk/wp-admin/press-this.php
r23554 r23567 92 92 93 93 // Set Variables 94 $title = isset( $_GET['t'] ) ? trim( strip_tags( html_entity_decode( stripslashes( $_GET['t'] ) , ENT_QUOTES) ) ) : '';94 $title = isset( $_GET['t'] ) ? trim( strip_tags( html_entity_decode( wp_unslash( $_GET['t'] ) , ENT_QUOTES) ) ) : ''; 95 95 96 96 $selection = ''; 97 97 if ( !empty($_GET['s']) ) { 98 $selection = str_replace(''', "'", stripslashes($_GET['s']));98 $selection = str_replace(''', "'", wp_unslash($_GET['s'])); 99 99 $selection = trim( htmlspecialchars( html_entity_decode($selection, ENT_QUOTES) ) ); 100 100 } -
trunk/wp-admin/setup-config.php
r23566 r23567 165 165 case 2: 166 166 foreach ( array( 'dbname', 'uname', 'pwd', 'dbhost', 'prefix' ) as $key ) 167 $$key = trim( stripslashes( $_POST[ $key ] ) );167 $$key = trim( wp_unslash( $_POST[ $key ] ) ); 168 168 169 169 $tryagain_link = '</p><p class="step"><a href="setup-config.php?step=1" onclick="javascript:history.go(-1);return false;" class="button button-large">' . __( 'Try again' ) . '</a>'; -
trunk/wp-admin/theme-editor.php
r23554 r23567 69 69 $file = $allowed_files['style.css']; 70 70 } else { 71 $relative_file = stripslashes( $file );71 $relative_file = wp_unslash( $file ); 72 72 $file = $theme->get_stylesheet_directory() . '/' . $relative_file; 73 73 } … … 79 79 case 'update': 80 80 check_admin_referer( 'edit-theme_' . $file . $stylesheet ); 81 $newcontent = stripslashes( $_POST['newcontent'] );81 $newcontent = wp_unslash( $_POST['newcontent'] ); 82 82 $location = 'theme-editor.php?file=' . urlencode( $relative_file ) . '&theme=' . urlencode( $stylesheet ) . '&scrollto=' . $scrollto; 83 83 if ( is_writeable( $file ) ) { -
trunk/wp-admin/upgrade.php
r23554 r23567 78 78 switch ( $step ) : 79 79 case 0: 80 $goback = stripslashes( wp_get_referer() );80 $goback = wp_unslash( wp_get_referer() ); 81 81 $goback = esc_url_raw( $goback ); 82 82 $goback = urlencode( $goback ); … … 91 91 wp_upgrade(); 92 92 93 $backto = !empty($_GET['backto']) ? stripslashes( urldecode( $_GET['backto'] ) ) : __get_option( 'home' ) . '/';93 $backto = !empty($_GET['backto']) ? wp_unslash( urldecode( $_GET['backto'] ) ) : __get_option( 'home' ) . '/'; 94 94 $backto = esc_url( $backto ); 95 95 $backto = wp_validate_redirect($backto, __get_option( 'home' ) . '/'); -
trunk/wp-admin/upload.php
r23554 r23567 133 133 exit; 134 134 } elseif ( ! empty( $_GET['_wp_http_referer'] ) ) { 135 wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), stripslashes( $_SERVER['REQUEST_URI'] ) ) );135 wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); 136 136 exit; 137 137 }
Note: See TracChangeset
for help on using the changeset viewer.