fix validation on dashboard site in ms-options, fixes #12831

git-svn-id: http://svn.automattic.com/wordpress/trunk@14004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
wpmuguru 2010-04-05 03:12:54 +00:00
parent e439ce17bd
commit dd1637ec7d
1 changed files with 2 additions and 2 deletions

View File

@ -77,8 +77,8 @@ switch ( $_GET['action'] ) {
if ( trim( $_POST['dashboard_blog'] ) == '' ) { if ( trim( $_POST['dashboard_blog'] ) == '' ) {
$_POST['dashboard_blog'] = $current_site->blog_id; $_POST['dashboard_blog'] = $current_site->blog_id;
$dashboard_blog_id = $current_site->blog_id; $dashboard_blog_id = $current_site->blog_id;
} else { } elseif ( ! preg_match( '/(--|\.)/', $_POST['dashboard_blog'] ) && preg_match( '|^([a-zA-Z0-9-\.])+$|', $_POST['dashboard_blog'] ) ) {
$dashboard_blog = untrailingslashit( sanitize_user( str_replace( '.', '', str_replace( $current_site->domain . $current_site->path, '', $_POST['dashboard_blog'] ) ) ) ); $dashboard_blog = $_POST['dashboard_blog'];
$blog_details = get_blog_details( $dashboard_blog ); $blog_details = get_blog_details( $dashboard_blog );
if ( false === $blog_details ) { if ( false === $blog_details ) {
if ( is_numeric( $dashboard_blog ) ) if ( is_numeric( $dashboard_blog ) )