handle incorrect hash
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user