Rev957, Sidebar displays onion peers in graph, Sidebar display bad file retry number, Sidebar site Update/Pause/Delete, Ratelimit sidebar update, Encoded typo, Fix onion findHashId, More retry for bad files, Log file path errors, Testcase for self findhashIds, Testcase for Tor findHashId, Better Tor version parse, UiWebsocket callback on update/pause/resume/delete, Skip invalid postMessage messages
This commit is contained in:
parent
ea3257dc09
commit
e891a10e54
18 changed files with 204 additions and 36 deletions
|
@ -176,7 +176,7 @@ class Site(object):
|
|||
# Retry download bad files
|
||||
def retryBadFiles(self, force=False):
|
||||
for bad_file, tries in self.bad_files.items():
|
||||
if force or random.randint(0, min(20, tries)) == 0: # Larger number tries = less likely to check every 15min
|
||||
if force or random.randint(0, min(40, tries)) < 4: # Larger number tries = less likely to check every 15min
|
||||
self.needFile(bad_file, update=True, blocking=False)
|
||||
|
||||
# Download all files of the site
|
||||
|
|
|
@ -247,6 +247,7 @@ class SiteStorage:
|
|||
|
||||
file_abspath = os.path.dirname(os.path.abspath(file_path))
|
||||
if ".." in file_path or not file_abspath.startswith(self.allowed_dir):
|
||||
self.site.log.error(u"File %s not in allowed dir: %s" % (file_path, self.allowed_dir))
|
||||
raise Exception(u"File not allowed: %s" % file_path)
|
||||
return file_path
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue