Aug 26 - Enhance security
CI / Python lint (flake8) (push) Has been cancelled
CI / Python syntax check (push) Has been cancelled
CI / Alembic migration chain (push) Has been cancelled
CI / JavaScript syntax check (push) Has been cancelled
CI / Build extension zip (push) Has been cancelled
CI / Python lint (flake8) (push) Has been cancelled
CI / Python syntax check (push) Has been cancelled
CI / Alembic migration chain (push) Has been cancelled
CI / JavaScript syntax check (push) Has been cancelled
CI / Build extension zip (push) Has been cancelled
This commit is contained in:
@@ -220,9 +220,11 @@ def generate_recovery_nonce() -> str:
|
||||
|
||||
# NOTE: compute_recovery_proof() is intentionally absent.
|
||||
# The server cannot decrypt the recovery blob (it was encrypted client-side with
|
||||
# the user's recovery key). Instead, the expected HMAC is computed inline in
|
||||
# the /recovery/data route using user.enc_key_salt as the HMAC key, stored in
|
||||
# flask.session, and compared on submission via verify_recovery_proof() below.
|
||||
# the user's recovery key). Instead, the expected HMAC is computed inline in the
|
||||
# /recovery/data route using the key returned by _recovery_proof_key(user) —
|
||||
# user.recovery_verifier, or user.enc_key_salt for legacy codes — persisted in
|
||||
# the recovery_challenges table, and compared on submission via
|
||||
# verify_recovery_proof() below.
|
||||
|
||||
|
||||
def verify_recovery_proof(expected_hmac: str, client_hmac: str) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user