handle incorrect hash

This commit is contained in:
2019-10-31 12:53:53 +02:00
parent b26dbf3216
commit b8bffcc587
2 changed files with 3 additions and 0 deletions

View File

@@ -526,6 +526,8 @@ def logout(name):
@app.route('/e/<ehash>/<filename>', methods=['GET'])
def download_expiring(ehash, filename = None):
file_path, expiring = get_expiring_file(ehash)
if file_path == None:
return 'No such link', 404
if not os.path.exists(file_path):
return 'No such file', 404
if expiring - time.time() < 0: