Commit Graph

3 Commits (2b2bb439a5efe330cd9c7a9f2de660c367c034e0)

Author SHA1 Message Date
nexxo 74ac406fc0 Make isUsable() apply the same 32-byte rule encrypter() does
isUsable() checked only "is SECRETS_KEY nonempty", so a set-but-malformed
key (wrong length, garbage base64) read back as usable even though
encrypter() rejects it two lines below. EditMailbox::save() and
MailboxTester::run() both gate on isUsable() specifically to avoid an
uncaught RuntimeException reaching the operator; a lying isUsable() meant
that guard did not fire in exactly the configuration it exists for.

Both methods now read resolveKey() — the base64: prefix, the raw-base64
path, the 32-byte check — so they cannot disagree about a value either
one is given. SecretVault::isUsable() and the secrets console page's
"no key" banner both delegate down to this and are covered here too, not
assumed to inherit the fix correctly.
2026-07-28 05:09:09 +02:00
nexxo 38c5518f45 Drop the stray path comment after the opening PHP tag 2026-07-27 21:19:32 +02:00
nexxo 93d409e18f Pull the secrets encrypter out where two callers can share it 2026-07-27 21:09:10 +02:00