Verify factor identity again after recovery mutation
Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a092fe-13b1-7f12-ac74-7d258af4d79c
This commit is contained in:
parent
3b7df9047e
commit
4d893ed3c2
3 changed files with 10 additions and 2 deletions
|
|
@ -35,7 +35,7 @@ def recover(store, request):
|
|||
store.record(base,expected,False) # An audit outage prevents mutation.
|
||||
store.disable(request['user'],request['serial'],expected)
|
||||
current=store.snapshot(request['user'],request['serial'])
|
||||
if current is None or current['active']:raise RecoveryError('readback_failed')
|
||||
if current is None or current['active'] or fingerprint(dict(current,active=True))!=expected:raise RecoveryError('readback_failed')
|
||||
store.record(base,expected,True)
|
||||
return dict(base,status='recovered',changes_applied=True,replayed=False)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue