From 68907823bf91ee46dd04a3848cef85634337c1de Mon Sep 17 00:00:00 2001 From: reed Date: Thu, 6 Mar 2025 10:47:13 -0500 Subject: [PATCH] remove expandvars call in unsafe path check --- bagit.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/bagit.py b/bagit.py index 69ea9ab..c9c1737 100755 --- a/bagit.py +++ b/bagit.py @@ -932,8 +932,6 @@ def _path_is_dangerous(self, path): return True if os.path.expanduser(path) != path: return True - if os.path.expandvars(path) != path: - return True real_path = os.path.realpath(os.path.join(self.path, path)) real_path = os.path.normpath(real_path) bag_path = os.path.realpath(self.path)