mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
An untested patch for MDL-7211 to fix firstclass hole (merged from stable)
This commit is contained in:
parent
7f094149b3
commit
6dfb22349f
@ -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
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user