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); }