From 921d048bcfeb390042090cc48be3af25ae369685 Mon Sep 17 00:00:00 2001 From: Alex Kenion Date: Thu, 7 Dec 2023 09:21:45 -0500 Subject: [PATCH] Ensured symlink loop detection is only called for links --- wordfence/scanning/scanner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wordfence/scanning/scanner.py b/wordfence/scanning/scanner.py index ddd57c15..0aa35591 100644 --- a/wordfence/scanning/scanner.py +++ b/wordfence/scanning/scanner.py @@ -216,7 +216,7 @@ def locate(self): log.log(VERBOSE, f'File added to scan queue: {path}') self.queue.put(path) else: - if not self._is_loop(self.path): + if not (os.path.islink(self.path) and self._is_loop(self.path)): self.queue.put(real_path)