Disallow / character in new usernames, as this conflicts with subpages (this was...
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 6 Jun 2003 19:10:22 +0000 (19:10 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 6 Jun 2003 19:10:22 +0000 (19:10 +0000)
includes/SpecialUserlogin.php

index 806ba79..e409e49 100644 (file)
@@ -31,7 +31,8 @@ function wfSpecialUserlogin()
        }
        $wpName = trim( $wpName );
        if ( ( "" == $wpName ) ||
-         preg_match( "/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/", $wpName ) ) 
+         preg_match( "/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/", $wpName ) ||
+         (strpos( $wpName, "/" ) !== false) ) 
 {
                mainLoginForm( wfMsg( "noname" ) );
                return;