modified: README.md

modified:   index.php
	modified:   username.sql
Add hashing of password stored in database
This commit is contained in:
Sven Luethi committed 2023-12-23 16:34:15 +01:00
1 parent 296f2a937d
commit bf0ad5bf3e
3 files changed
+5 -4

No files matched your search

+3 -2
View File
@@ -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());
?>