From 6dfb22349f1bb33035e9b10cb49ceda2b1a72275 Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 1 Nov 2006 06:54:47 +0000 Subject: [PATCH] An untested patch for MDL-7211 to fix firstclass hole (merged from stable) --- auth/fc/fcFPP.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/auth/fc/fcFPP.php b/auth/fc/fcFPP.php index 436d8a49e1..b9f25a70ca 100644 --- a/auth/fc/fcFPP.php +++ b/auth/fc/fcFPP.php @@ -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 +?> -- 2.39.5