mirror of
https://github.com/YunoHost/dynette.git
synced 2024-09-03 20:06:17 +02:00
Misc clarification
This commit is contained in:
parent
8ce490a8e7
commit
653289c446
1 changed files with 4 additions and 1 deletions
5
app.py
5
app.py
|
@ -151,7 +151,7 @@ def delete_using_recovery_password_or_key(subdomain):
|
|||
with open(f"{app.config['DB_FOLDER']}/{subdomain}.key") as f:
|
||||
if not hmac.compare_digest(key, f.read()):
|
||||
return '"Access denied"', 403
|
||||
if recovery_password:
|
||||
elif recovery_password:
|
||||
if not os.path.exists(
|
||||
f"{app.config['DB_FOLDER']}/{subdomain}.recovery_password"
|
||||
):
|
||||
|
@ -161,6 +161,9 @@ def delete_using_recovery_password_or_key(subdomain):
|
|||
|
||||
if not bcrypt.checkpw(recovery_password.encode(), hashed):
|
||||
return '"Access denied"', 403
|
||||
# Shouldnt happen, this is checked before
|
||||
else:
|
||||
return '"Access denied"', 403
|
||||
|
||||
if os.path.exists(f"{app.config['DB_FOLDER']}/{subdomain}.key"):
|
||||
os.remove(f"{app.config['DB_FOLDER']}/{subdomain}.key")
|
||||
|
|
Loading…
Reference in a new issue