mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-12-11 18:45:34 +00:00
CVE-2024-51998 - file:/ path traversal access should not be allowed to access a file without ALLOW_FILE_URI set
This commit is contained in:
@@ -33,8 +33,8 @@ class difference_detection_processor():
|
||||
|
||||
url = self.watch.link
|
||||
|
||||
# Protect against file:// access, check the real "link" without any meta "source:" etc prepended.
|
||||
if re.search(r'^file://', url, re.IGNORECASE):
|
||||
# Protect against file://, file:/ access, check the real "link" without any meta "source:" etc prepended.
|
||||
if re.search(r'^file:/', url.strip(), re.IGNORECASE):
|
||||
if not strtobool(os.getenv('ALLOW_FILE_URI', 'false')):
|
||||
raise Exception(
|
||||
"file:// type access is denied for security reasons."
|
||||
|
||||
Reference in New Issue
Block a user