Found while fixing #271, deliberately left out of scope there.
`list_accounts` does `serde_json::from_str(&protocol_str).unwrap_or(AccountProtocol::ImapSmtp)`. An unrecognised or corrupted stored `protocol` discriminator is coerced to `ImapSmtp` rather than rejected — and the row is then read through the wrong columns for that account type, so the account comes back plausible and wrong with no error and no log line.
Same shape as #271 (which coerced an unparseable TLS mode to `ImplicitTls`) and sits a few lines from it. #271 now fails closed with `DatabaseError::Corrupted` naming the account, column and raw value; this should do the same.
Note the deliberate asymmetry established in #271: the salvage path in `recovery.rs` stays lenient because it has no caller to return an error to. Preserve that distinction.
Found while fixing #271, deliberately left out of scope there.
\`list_accounts\` does \`serde_json::from_str(&protocol_str).unwrap_or(AccountProtocol::ImapSmtp)\`. An unrecognised or corrupted stored \`protocol\` discriminator is coerced to \`ImapSmtp\` rather than rejected — and the row is then read through the *wrong columns* for that account type, so the account comes back plausible and wrong with no error and no log line.
Same shape as #271 (which coerced an unparseable TLS mode to \`ImplicitTls\`) and sits a few lines from it. #271 now fails closed with \`DatabaseError::Corrupted\` naming the account, column and raw value; this should do the same.
Note the deliberate asymmetry established in #271: the salvage path in \`recovery.rs\` stays lenient because it has no caller to return an error to. Preserve that distinction.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found while fixing #271, deliberately left out of scope there.
`list_accounts` does `serde_json::from_str(&protocol_str).unwrap_or(AccountProtocol::ImapSmtp)`. An unrecognised or corrupted stored `protocol` discriminator is coerced to `ImapSmtp` rather than rejected — and the row is then read through the wrong columns for that account type, so the account comes back plausible and wrong with no error and no log line.
Same shape as #271 (which coerced an unparseable TLS mode to `ImplicitTls`) and sits a few lines from it. #271 now fails closed with `DatabaseError::Corrupted` naming the account, column and raw value; this should do the same.
Note the deliberate asymmetry established in #271: the salvage path in `recovery.rs` stays lenient because it has no caller to return an error to. Preserve that distinction.