Skip to content

fix: preserve keyset timestamps during rotation (closes #882)#892

Open
joelklabo wants to merge 1 commit intocashubtc:mainfrom
joelklabo:fix/keyset-timestamp-rotation
Open

fix: preserve keyset timestamps during rotation (closes #882)#892
joelklabo wants to merge 1 commit intocashubtc:mainfrom
joelklabo:fix/keyset-timestamp-rotation

Conversation

@joelklabo
Copy link

This PR fixes the bug reported in issue #882 where keyset timestamps (valid_from, valid_to, first_seen) were being nullified upon keyset rotation.

Changes

  • Fix update_keyset to properly preserve existing timestamp values instead of using 'or' which incorrectly treated None values
  • Set valid_to timestamp when deactivating old keyset during rotation
  • Fix pre-existing bug: use selected_keyset.id instead of undefined 'keyset' in log message

This addresses the Nodesignal bug bounty.

- Fix update_keyset to properly preserve existing timestamp values instead of using 'or' which incorrectly treated None values
- Set valid_to timestamp when deactivating old keyset during rotation
- Fix pre-existing bug: use selected_keyset.id instead of undefined 'keyset' in log message

This fixes the bug reported in issue cashubtc#882 where timestamps were being nullified upon keyset rotation.
@callebtc
Copy link
Collaborator

hi, please undo unrelated changes and fix the pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants