Silent data corruption from unwrap_or_default() on serialization #19
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: High
crates/adapters/sqlite/src/channel.rsusesserde_json::to_string(f).unwrap_or_default()for gap_filler serialization. If serialization fails, it silently writes""to the DB, which will later deserialize asNone— quietly losing the channel's gap filler config.Same file: gap_filler deserialization uses
.and_then(|s| serde_json::from_str(s).ok())which silently swallows corrupt JSON.Fix: propagate the error or at minimum log a warning when serialization/deserialization fails.