We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8adce32 commit a6b5645Copy full SHA for a6b5645
src/receive_imf.rs
@@ -3646,11 +3646,16 @@ async fn lookup_pgp_contact_by_fingerprint(
3646
context: &Context,
3647
fingerprint: &str,
3648
) -> Result<Option<ContactId>> {
3649
+ debug_assert!(!fingerprint.is_empty());
3650
+ if fingerprint.is_empty() {
3651
+ // Avoid accidentally looking up a non-PGP contact.
3652
+ return Ok(None);
3653
+ }
3654
if let Some(contact_id) = context
3655
.sql
3656
.query_row_optional(
3657
"SELECT id FROM contacts
- WHERE contacts.fingerprint=?",
3658
+ WHERE fingerprint=? AND fingerprint!=''",
3659
(fingerprint,),
3660
|row| {
3661
let contact_id: ContactId = row.get(0)?;
0 commit comments