From 18d30c48d518424b404602ae663724edaf0a2e2c Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Sat, 5 Jul 2025 10:15:18 +0530 Subject: [PATCH] fix: add missing check for hostname --- src/Appwrite/Network/Validator/Origin.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Network/Validator/Origin.php b/src/Appwrite/Network/Validator/Origin.php index fc58651723..5fc019942d 100644 --- a/src/Appwrite/Network/Validator/Origin.php +++ b/src/Appwrite/Network/Validator/Origin.php @@ -55,7 +55,10 @@ class Origin extends Validator return $validator->isValid($this->host); } - if (!empty($this->scheme) && in_array($this->scheme, $this->schemes, true)) { + if (!empty($this->scheme) && + in_array($this->scheme, $this->schemes, true) && + in_array($this->host, $this->hostnames, true) + ) { return true; }