Update global config variables

This commit is contained in:
2024-03-12 19:33:09 +01:00
committed by Felix Albrigtsen
parent 151a0d44f6
commit 310246dd20
23 changed files with 36 additions and 27 deletions

View File

@@ -9,7 +9,7 @@ if($_SERVER['REQUEST_METHOD'] === 'POST') {
if (isset($_SERVER["HTTP_AUTHORIZATION"])) {
list($type, $data) = explode(" ", $_SERVER["HTTP_AUTHORIZATION"], 2);
if (strcasecmp($type, "Bearer") == 0) {
if (hash_equals($data, $doorSensorSecret)) {
if (hash_equals($data, $DOOR_SECRET)) {
handleSetState();
} else {
echo '{"status": "error", "message": "Invalid authentication key"}';