From bf4750fd9691a0ee03b00371d0fa29bc1ae56549 Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 9 Jan 2007 12:43:55 +0000 Subject: Save new admin email with hash in db. (fixes #204) Better option update message Sanitize options git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@836 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/options.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'wp-admin/options.php') diff --git a/wp-admin/options.php b/wp-admin/options.php index 63486d5..f502a7d 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -16,9 +16,12 @@ if( $_GET[ 'adminhash' ] ) { update_option( "admin_email", $new_admin_details[ 'newemail' ] ); delete_option( "adminhash" ); delete_option( "new_admin_email" ); + wp_redirect( get_option( "siteurl" ) . "/wp-admin/options-general.php?updated=true" ); + exit; + } else { + wp_redirect( get_option( "siteurl" ) . "/wp-admin/options-general.php?updated=false" ); + exit; } - wp_redirect( get_option( "siteurl" ) . "/wp-admin/options-general.php?updated=true" ); - exit; } function sanitize_option($option, $value) { // Remember to call stripslashes! @@ -58,6 +61,7 @@ function sanitize_option($option, $value) { // Remember to call stripslashes! if (current_user_can('unfiltered_html') == false) $value = wp_filter_post_kses( $value ); // calls stripslashes then addslashes $value = stripslashes($value); + $value = wp_specialchars( $value ); break; case 'blog_charset': -- cgit