modified: README.md
modified: index.php modified: username.sql Add hashing of password stored in database
This commit is contained in:
1 parent
296f2a937d
commit
bf0ad5bf3e
3 files changed
+5
-4
No files matched your search
@@ -33,7 +33,7 @@ class Auth {
|
||||
}
|
||||
|
||||
$pass = $this->db->getConfigValueByKey('PASSWORD');
|
||||
if($_SERVER['PHP_AUTH_PW'] !== $pass) {
|
||||
if(hash('sha256', $_SERVER['PHP_AUTH_PW']) !== $pass) {
|
||||
$this->respondWithAccessDenied();
|
||||
}
|
||||
}
|
||||
@@ -435,7 +435,8 @@ class App {
|
||||
unset($_GET[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
//$db = new DB('username.db');
|
||||
//new App($db);
|
||||
$auth = new Auth();
|
||||
new App($auth->getDBHandle());
|
||||
?>
|
||||
|
||||
Reference in new issue
Block a user