(bug 26854) Invalid user names go unchecked. Applied most of the patch submitted...
[lhc/web/wiklou.git] / maintenance / protect.php
index aab84d6..c304396 100644 (file)
@@ -47,6 +47,10 @@ class Protect extends Maintenance {
                }
 
                $wgUser = User::newFromName( $userName );
+               if ( !$wgUser ) {
+                       $this->error( "Invalid username", true );
+               }
+               
                $restrictions = array( 'edit' => $protection, 'move' => $protection );
 
                $t = Title::newFromText( $this->getArg() );