summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-10-24 19:26:33 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-10-24 19:26:33 +0000
commit7cdc691c4be6f7ecb3f36e087970121f8fd2abaa (patch)
treea33e2a48e09d71e361361c5aa0d858aeeca86c69
parent7e007d8024faecc4d9a7f607dcba42a4cfa7bb5d (diff)
downloadwordpress-mu-7cdc691c4be6f7ecb3f36e087970121f8fd2abaa.tar.gz
wordpress-mu-7cdc691c4be6f7ecb3f36e087970121f8fd2abaa.tar.xz
wordpress-mu-7cdc691c4be6f7ecb3f36e087970121f8fd2abaa.zip
Lowercase blog and paths only, fixes #777
git-svn-id: http://svn.automattic.com/wordpress-mu/branches/2.6@1512 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-admin/wpmu-edit.php3
-rw-r--r--wpmu-settings.php3
2 files changed, 5 insertions, 1 deletions
diff --git a/wp-admin/wpmu-edit.php b/wp-admin/wpmu-edit.php
index ed93577..c7c5751 100644
--- a/wp-admin/wpmu-edit.php
+++ b/wp-admin/wpmu-edit.php
@@ -113,6 +113,9 @@ switch( $_GET['action'] ) {
$path = $base.$domain.'/';
}
+ $blog = strtolower( $blog );
+ $path = strtolower( $path );
+
$password = 'N/A';
$user_id = email_exists($email);
if( !$user_id ) {
diff --git a/wpmu-settings.php b/wpmu-settings.php
index 08790fd..ff08b18 100644
--- a/wpmu-settings.php
+++ b/wpmu-settings.php
@@ -5,7 +5,7 @@ if( $current_site && $current_blog )
// depreciated
$wpmuBaseTablePrefix = $table_prefix;
-$domain = addslashes( $_SERVER['HTTP_HOST'] );
+$domain = strtolower( addslashes( $_SERVER['HTTP_HOST'] ) );
if( substr( $domain, 0, 4 ) == 'www.' )
$domain = substr( $domain, 4 );
if( strpos( $domain, ':' ) ) {
@@ -26,6 +26,7 @@ if( substr( $domain, -1 ) == '.' )
$path = preg_replace( '|([a-z0-9-]+.php.*)|', '', $_SERVER['REQUEST_URI'] );
$path = str_replace ( '/wp-admin/', '/', $path );
$path = preg_replace( '|(/[a-z0-9-]+?/).*|', '$1', $path );
+$path = strtolower( $path );
function wpmu_current_site() {
global $wpdb, $current_site, $domain, $path, $sites;