An untested patch for MDL-7211 to fix firstclass hole (merged from stable)

This commit is contained in:
moodler 2006-11-01 06:54:47 +00:00
parent 7f094149b3
commit 6dfb22349f

View 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
}
?>
?>