make thumb-dir.txt unretrievable

This commit is contained in:
ed
2021-07-05 00:21:33 +02:00
parent 456f575637
commit 1e27a4c2df
2 changed files with 12 additions and 2 deletions

View File

@@ -1561,7 +1561,9 @@ class HttpCli(object):
raise Pebkac(404)
if self.readable:
if rem.startswith(".hist/up2k."):
if rem.startswith(".hist/up2k.") or (
rem.endswith("/dir.txt") and rem.startswith(".hist/th/")
):
raise Pebkac(403)
is_dir = stat.S_ISDIR(st.st_mode)