Sanitize slashes in exercise container names

This commit is contained in:
I-Al-Istannen
2024-10-21 16:28:49 +02:00
parent 4f9e2ab48d
commit f9bb2e41cf
3 changed files with 29 additions and 11 deletions

View File

@ -328,6 +328,9 @@ instance's greatest bottleneck.
)
self._visited_urls[element.url] = parent_path
# element.name might contain `/` if the crawler created nested elements,
# so we can not sanitize it here. We trust in the output dir to thwart worst-case
# directory escape attacks.
element_path = PurePath(parent_path, element.name)
if element.type in _VIDEO_ELEMENTS: