From 7ce0e3c38c1efcad87d31bb71293ce82e9a7e5d9 Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Sat, 8 Feb 2025 16:28:04 +0530 Subject: [PATCH] Add strict checks for value of secret --- src/Appwrite/Platform/Modules/Sites/Http/Variables/Update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Variables/Update.php b/src/Appwrite/Platform/Modules/Sites/Http/Variables/Update.php index b5da83e23f..7ec7b3ef9a 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Variables/Update.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Variables/Update.php @@ -76,7 +76,7 @@ class Update extends Base throw new Exception(Exception::VARIABLE_NOT_FOUND); } - if ($variable->getAttribute('secret') && !$secret) { + if ($variable->getAttribute('secret') === true && $secret === false) { throw new Exception(Exception::VARIABLE_CANNOT_UNSET_SECRET); }