vaultwarden/src
eason cb46fcb948
fix: return Err instead of panic on unknown cipher atype in to_json() (#7068)
`Cipher::to_json()` returns `Result<Value, Error>` but its match arm for
unknown `atype` values called `panic!("Wrong type")` instead of
propagating an error. This means if a cipher with an invalid/unknown type
ends up in the database (via direct DB edits, data migration issues, or
future type additions in the upstream Bitwarden protocol), the entire
server process would crash on the next sync request.

Replace the `panic!` with `err!()` so callers receive a proper `Err` and
can handle or log it gracefully without taking down the server.

Co-authored-by: easonysliu <easonysliu@tencent.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Daniel García <dani-garcia@users.noreply.github.com>
2026-04-29 22:58:50 +02:00
..
api Replace organization_uuid unwrap with proper error handling (#6936) 2026-04-29 22:58:39 +02:00
db fix: return Err instead of panic on unknown cipher atype in to_json() (#7068) 2026-04-29 22:58:50 +02:00
static Several SSO Fixes (#7163) 2026-04-29 22:25:36 +02:00
auth.rs Misc org fixes (#7032) 2026-03-29 23:15:48 +02:00
config.rs Apply ref_option lint findings (#7143) 2026-04-28 18:34:40 +02:00
crypto.rs Several SSO Fixes (#7163) 2026-04-29 22:25:36 +02:00
error.rs Optimizations and build speedup (#6339) 2025-11-01 22:21:04 +01:00
http_client.rs Fix Host/IP resolving (#7162) 2026-04-29 22:20:59 +02:00
mail.rs fix(send_invite): add orgSsoIdentifier if sso_only is enabled (#6824) 2026-02-23 20:28:12 +01:00
main.rs Fix windows build issues (#7065) 2026-04-08 15:35:18 +02:00
ratelimit.rs Optimizations and build speedup (#6339) 2025-11-01 22:21:04 +01:00
sso.rs Several SSO Fixes (#7163) 2026-04-29 22:25:36 +02:00
sso_client.rs Several SSO Fixes (#7163) 2026-04-29 22:25:36 +02:00
util.rs Fix Host/IP resolving (#7162) 2026-04-29 22:20:59 +02:00