]> git.mjollnir.org Git - moodle.git/commitdiff
An untested patch for MDL-7211 to fix firstclass hole (merged from stable)
authormoodler <moodler>
Wed, 1 Nov 2006 06:54:47 +0000 (06:54 +0000)
committermoodler <moodler>
Wed, 1 Nov 2006 06:54:47 +0000 (06:54 +0000)
auth/fc/fcFPP.php

index 436d8a49e1fdc1ffc458aa106d1b3c35daa2bbb6..b9f25a70ca5b311fc894ea6216d09563c68c9f4d 100644 (file)
@@ -108,13 +108,14 @@ class fcFPP
         if($this->_debug) echo $line;
         
         if (preg_match ("/^\+0/", $line)) {      //+0, user with subadmin privileges
-        $this->_user = $userid;
-        $this->_pwd  = $passwd; 
-        return TRUE;        
-        } elseif (preg_match ("/^\Sorry/",$line)){    //Denied access but a valid user and password
+            $this->_user = $userid;
+            $this->_pwd  = $passwd; 
+            return TRUE;        
+        } elseif (strpos($line, 'You are not allowed')){ // Denied access but a valid user and password
+                                                         // "Sorry. You are not allowed to login with the FPP interface"
             return TRUE;
         } else {                    //Invalid user or password
-        return FALSE;
+            return FALSE;
         }
     
 
@@ -215,4 +216,4 @@ class fcFPP
 }
    
 
-?>
\ No newline at end of file
+?>