Commit Graph

1 Commits (dev)

Author SHA1 Message Date
Ashley 3415b75cdf Recover from legacy plaintext config cache entries on decrypt failure
On a cache hit for a protected key, a stale pre-encryption plaintext
entry made decrypt() throw and the broad catch returned config($key)
while leaving the bad entry in cache for its full TTL. Forget the entry
on decrypt failure and fall through to the DB read + re-cache path.

Verified with vendor/bin/pest (sqlite :memory:): the new regression
test fails before the fix (get returns null instead of the admin DB
value) and all three cases pass after it.
1 week ago