diff --git a/model/Login.php b/model/Login.php index 76dd3beb..0ed98bd7 100644 --- a/model/Login.php +++ b/model/Login.php @@ -20,7 +20,10 @@ class Login * Attempt to log a user in. * @return boolean true on successful login (i.e. password matches etc) */ - public function login(string $username, string $password): bool + public function login( + string $username, + #[\SensitiveParameter] + string $password): bool { $active = db_get_boolean(true); $query = "SELECT password FROM {$this->key_table} WHERE username = :username AND active = :active"; @@ -36,7 +39,7 @@ class Login $crypt_password = pacrypt($password, $row['password'], $username); } catch (\Exception $e) { error_log("Error while trying to call pacrypt()"); - error_log("" . $e); + error_log("" . $e->getMessage()); hash_equals("not", "comparable"); return false; // just refuse to login? }