mirror of
https://github.com/misterunknown/ifm.git
synced 2025-08-11 18:43:58 +02:00
misterunknown: fixed some authentication bugs
This commit is contained in:
6
ifm.php
6
ifm.php
@@ -1529,12 +1529,12 @@ function checkCredentials($user, $pass) {
|
||||
list($uname, $hash) = explode(":", $srcopt);
|
||||
break;
|
||||
case "file":
|
||||
if(file_exists($srcopt) && is_readable($srcopt)) {
|
||||
list($uname, $hash) = explode(":", fgets(fopen($file, 'r')));
|
||||
if(@file_exists($srcopt) && @is_readable($srcopt)) {
|
||||
list($uname, $hash) = explode(":", fgets(fopen($srcopt, 'r')));
|
||||
}
|
||||
break;
|
||||
}
|
||||
return password_verify($pass, $hash)?($uname == $user):false;
|
||||
return password_verify($pass, trim($hash))?($uname == $user):false;
|
||||
}
|
||||
// print login form
|
||||
function loginForm($loginFailed=false) {
|
||||
|
Reference in New Issue
Block a user