From e0a78061514745b694400d2ddbebbc12246da5f3 Mon Sep 17 00:00:00 2001 From: Mateusz Nastalski Date: Wed, 1 Feb 2023 22:12:47 +0100 Subject: [PATCH] Disable backslash escaping in "is allowed" helper --- src/IsAllowedFileHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IsAllowedFileHelper.php b/src/IsAllowedFileHelper.php index dd1b891..41cdb00 100644 --- a/src/IsAllowedFileHelper.php +++ b/src/IsAllowedFileHelper.php @@ -45,7 +45,7 @@ private function absolutizePath(string $path): string public function matches(Scope $scope, string $allowedPath): bool { $file = $scope->getTraitReflection() ? $scope->getTraitReflection()->getFileName() : $scope->getFile(); - return $file !== null && fnmatch($this->absolutizePath($allowedPath), $file); + return $file !== null && fnmatch($this->absolutizePath($allowedPath), $file, FNM_NOESCAPE); }