Flagged during #248 (salvage TLS fix). db.rs's tls_mode_from_db (used by normal account reads: list_accounts/get_account etc.) has the SAME silent-fallback-to-ImplicitTls shape that #248 just fixed in the salvage path — an unrecognized stored TLS-mode string silently becomes ImplicitTls with no signal, on the path that runs constantly (not just recovery). TLS modes are validated on write (#194/#200) so this should only happen on corruption/tampering, but a silent downgrade still hides it. Goal: make it consistent with the salvage fix — preserve the real mode; on a genuinely unrecognized value, WARN-log (account id + column + raw value) rather than silently defaulting. Source: #248 follow-up.
Flagged during #248 (salvage TLS fix). `db.rs`'s `tls_mode_from_db` (used by normal account reads: list_accounts/get_account etc.) has the SAME silent-fallback-to-ImplicitTls shape that #248 just fixed in the salvage path — an unrecognized stored TLS-mode string silently becomes ImplicitTls with no signal, on the path that runs constantly (not just recovery). TLS modes are validated on write (#194/#200) so this should only happen on corruption/tampering, but a silent downgrade still hides it. Goal: make it consistent with the salvage fix — preserve the real mode; on a genuinely unrecognized value, WARN-log (account id + column + raw value) rather than silently defaulting. Source: #248 follow-up.
Fixed in #425 (ce49515), merged to dev. tls_mode_from_db now fails closed with DatabaseError::Corrupted naming the account, the column and the raw value, instead of silently coercing an unrecognised stored mode to ImplicitTls. One function served both imap_tls_mode and smtp_tls_mode, so both are covered and the test exercises each column. list_accounts already returned Result, so no signature or caller changed and nothing panics.
The salvage path in recovery.rs is deliberately left lenient — it has no caller to return an error to — and that asymmetry is documented in code.
Follow-up filed as #426: the same silent-fallback shape sits a few lines away, coercing an unparseable stored protocol discriminator to ImapSmtp, which then reads the wrong columns for that row.
Fixed in #425 (`ce49515`), merged to `dev`. `tls_mode_from_db` now fails closed with `DatabaseError::Corrupted` naming the account, the column and the raw value, instead of silently coercing an unrecognised stored mode to `ImplicitTls`. One function served both `imap_tls_mode` and `smtp_tls_mode`, so both are covered and the test exercises each column. `list_accounts` already returned `Result`, so no signature or caller changed and nothing panics.
The salvage path in `recovery.rs` is deliberately left lenient — it has no caller to return an error to — and that asymmetry is documented in code.
Follow-up filed as #426: the same silent-fallback shape sits a few lines away, coercing an unparseable stored `protocol` discriminator to `ImapSmtp`, which then reads the wrong columns for that row.
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.
Flagged during #248 (salvage TLS fix).
db.rs'stls_mode_from_db(used by normal account reads: list_accounts/get_account etc.) has the SAME silent-fallback-to-ImplicitTls shape that #248 just fixed in the salvage path — an unrecognized stored TLS-mode string silently becomes ImplicitTls with no signal, on the path that runs constantly (not just recovery). TLS modes are validated on write (#194/#200) so this should only happen on corruption/tampering, but a silent downgrade still hides it. Goal: make it consistent with the salvage fix — preserve the real mode; on a genuinely unrecognized value, WARN-log (account id + column + raw value) rather than silently defaulting. Source: #248 follow-up.Fixed in #425 (
ce49515), merged todev.tls_mode_from_dbnow fails closed withDatabaseError::Corruptednaming the account, the column and the raw value, instead of silently coercing an unrecognised stored mode toImplicitTls. One function served bothimap_tls_modeandsmtp_tls_mode, so both are covered and the test exercises each column.list_accountsalready returnedResult, so no signature or caller changed and nothing panics.The salvage path in
recovery.rsis deliberately left lenient — it has no caller to return an error to — and that asymmetry is documented in code.Follow-up filed as #426: the same silent-fallback shape sits a few lines away, coercing an unparseable stored
protocoldiscriminator toImapSmtp, which then reads the wrong columns for that row.