Ticket #17445: 17445.patch
File 17445.patch, 3.7 KB (added by , 14 years ago) |
---|
-
wp-admin/network/site-settings.php
### Eclipse Workspace Patch 1.0 #P wordpress
111 111 $disabled = false; 112 112 $class = 'all-options'; 113 113 if ( is_serialized( $option->option_value ) ) { 114 if ( is_serialized_string($option->option_value ) ) {115 $option->option_value = esc_html( maybe_unserialize( $option->option_value ), 'single' );114 if ( _is_serialized_test( 's', $option->option_value ) ) { 115 $option->option_value = esc_html( @unserialize( $option->option_value ), 'single' ); 116 116 } else { 117 117 $option->option_value = 'SERIALIZED DATA'; 118 118 $disabled = true; -
wp-admin/options.php
180 180 if ( $option->option_name == '' ) 181 181 continue; 182 182 if ( is_serialized( $option->option_value ) ) { 183 if ( is_serialized_string($option->option_value ) ) {183 if ( _is_serialized_test( 's', $option->option_value ) ) { 184 184 // this is a serialized string, so we should display it 185 $value = maybe_unserialize( $option->option_value );185 $value = @unserialize( $option->option_value ); 186 186 $options_to_update[] = $option->option_name; 187 187 $class = 'all-options'; 188 188 } else { -
wp-includes/functions.php
276 276 } 277 277 278 278 /** 279 * Check whether serialized data is of a format defined by char. 280 * 281 * Used internally to prevent running is serialized too much. 282 * 283 * @access private 284 * @param string $char to test for, e.g. 's' for strings. 285 * @param mixed $data to test 286 * @param bool $fullcheck (optional) by default, this functions precodnition is, that $data is of such a format that {@see is_serialized()}} has returned true on. Set this parameter to true to perform this precondition check in case not. 287 * @return bool 288 */ 289 function _is_serialized_test($char, $data, $fullcheck = false) { 290 if ($fullcheck && !is_serialized($data)) { 291 return false; 292 } 293 return $char === strtolower( $data[ strcspn( $data, 'adObisS:"{};' ) ] ); 294 } 295 296 /** 279 297 * Check whether serialized data is of string type. 280 298 * 281 299 * @since 2.0.5 -
wp-admin/includes/post.php
719 719 $meta = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->postmeta WHERE meta_id = %d", $mid) ); 720 720 if ( empty($meta) ) 721 721 return false; 722 if ( is_serialized_string( $meta->meta_value ) )723 $meta->meta_value = maybe_unserialize( $meta->meta_value );722 if ( _is_serialized_test( 's', $meta->meta_value, true ) ) 723 $meta->meta_value = @unserialize( $meta->meta_value ); 724 724 return $meta; 725 725 } 726 726 -
wp-admin/includes/template.php
478 478 $style .= ' hidden'; 479 479 480 480 if ( is_serialized( $entry['meta_value'] ) ) { 481 if ( is_serialized_string($entry['meta_value'] ) ) {481 if ( _is_serialized_test( 's', $entry['meta_value'] ) ) { 482 482 // this is a serialized string, so we should display it 483 $entry['meta_value'] = maybe_unserialize( $entry['meta_value'] );483 $entry['meta_value'] = @unserialize( $entry['meta_value'] ); 484 484 } else { 485 485 // this is a serialized array/object so we should NOT display it 486 486 --$count;