Files
Xika 1243c7db57
ci / verify (pull_request) Successful in 50s
fix(crypto): raise clear EncryptionError for invalid Fernet key (BIT-33939)
get_fernet() let Fernet() raise a raw ValueError when ENCRYPTION_KEY was
malformed (e.g. the 'change_me_fernet_key' placeholder shipped in
.env.example), crashing the WebDAV sync loop with a cryptic
'Fernet key must be 32 url-safe base64-encoded bytes.' message.

Guard the Fernet() construction so an invalid key raises EncryptionError
with actionable guidance pointing at Fernet.generate_key(). Also blank
the invalid placeholder in .env.example so it cannot be copied verbatim
into production.

Paperclip-Issue: BIT-33939
2026-12-04 10:16:50 +00:00
..