Skip to content

Commit

Permalink
Fixes whitelisted_directories
Browse files Browse the repository at this point in the history
  • Loading branch information
w4ffl35 committed May 9, 2024
1 parent 5f29cbe commit 29fb9da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="darklock",
version="0.1.4",
version="0.1.5",
author="Capsize LLC",
description="",
long_description=open("README.md", "r", encoding="utf-8").read(),
Expand Down
8 changes: 4 additions & 4 deletions src/darklock/restrict_os_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ def __init__(self):
self.logger.addHandler(logging.StreamHandler())

def is_directory_whitelisted(self, directory: str) -> bool:
print("IS DIRECTORY WHITELISTED")
print(directory)
print(self.whitelisted_directories)
return directory in self.whitelisted_directories
for d in self.whitelisted_directories:
if str(d) in str(directory):
return True
return False

def restrict_os_write(self, *args, **kwargs):
return self.original_os_write(*args, **kwargs)
Expand Down

0 comments on commit 29fb9da

Please sign in to comment.