delete session after password change
This commit is contained in:
parent
61509f6010
commit
c3ff1bc2b5
1 changed files with 1 additions and 0 deletions
|
@ -245,6 +245,7 @@ async def change(req: ChangeData, session_id: str = Cookie(None)) -> SuccessData
|
||||||
hashed = session["proposed_password_hash"]
|
hashed = session["proposed_password_hash"]
|
||||||
if not kdf_verify(hashed, req.password):
|
if not kdf_verify(hashed, req.password):
|
||||||
raise HTTPException(status_code=409)
|
raise HTTPException(status_code=409)
|
||||||
|
delete_session(session_id)
|
||||||
|
|
||||||
success = change_password(session["username"], req.password)
|
success = change_password(session["username"], req.password)
|
||||||
return SuccessData(success=success)
|
return SuccessData(success=success)
|
||||||
|
|
Loading…
Reference in a new issue