alby-hub/config
Roland 3b3c37dd0c
fix: remove legacy acceptance of empty unlock password check (#2534)
* fix: remove legacy acceptance of empty unlock password check

CheckUnlockPassword previously treated a missing or empty
UnlockPasswordCheck value as a match — a legacy compatibility path from
before the canary was always written. It now requires the stored value
to be present and to equal the expected string.

StartApp checks for the canary up front and, if it is missing, stops
with a message asking the user to restore from a backup rather than
continuing. A new IsUnlockPasswordCheckSet helper reports whether the
value is present.

keys.Init now returns the error from reading NostrSecretKey instead of
ignoring it, so a read failure aborts instead of generating and saving a
new key.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: add operation context to unlock password check errors

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-12 14:48:06 +07:00
..
tests fix: remove legacy acceptance of empty unlock password check (#2534) 2026-08-12 14:48:06 +07:00
aesgcm.go feat: do not require unlock password to recover encrypted scb (#768) 2024-11-01 13:26:10 +07:00
aesgcm_test.go feat: do not require unlock password to recover encrypted scb (#768) 2024-11-01 13:26:10 +07:00
config.go fix: remove legacy acceptance of empty unlock password check (#2534) 2026-08-12 14:48:06 +07:00
config_test.go fix: remove legacy acceptance of empty unlock password check (#2534) 2026-08-12 14:48:06 +07:00
models.go fix: remove legacy acceptance of empty unlock password check (#2534) 2026-08-12 14:48:06 +07:00