Skip to content
Snippets Groups Projects
Commit dbac5d20 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Do not list always restricted files.

parent 40a25ab6
No related branches found
No related tags found
1 merge request!63v0.6.2
Pipeline #62467 passed
...@@ -808,7 +808,8 @@ class PublicUploadFiles(UploadFiles): ...@@ -808,7 +808,8 @@ class PublicUploadFiles(UploadFiles):
content_path = path[directory_len + (0 if directory_len == 0 else 1):] content_path = path[directory_len + (0 if directory_len == 0 else 1):]
if path.startswith(directory) and '/' not in content_path: if path.startswith(directory) and '/' not in content_path:
if '/' not in content_path: if '/' not in content_path:
results.append((content_path, zf.getinfo(path).file_size)) if not always_restricted(content_path) or self._is_authorized:
results.append((content_path, zf.getinfo(path).file_size))
else: else:
# this asserts that sub directories are always behind their # this asserts that sub directories are always behind their
# parents and file siblings # parents and file siblings
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment