[geary/wip/contact-cleanup-713932: 1/2] Validate contact emails before adding
- From: Charles Lindsay <clindsay src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/contact-cleanup-713932: 1/2] Validate contact emails before adding
- Date: Fri, 21 Feb 2014 19:57:54 +0000 (UTC)
commit 06e0f115eddaaedc74adbe7d16a428c018653168
Author: Charles Lindsay <chaz yorba org>
Date: Fri Feb 21 11:42:41 2014 -0800
Validate contact emails before adding
src/engine/imap-db/imap-db-message-addresses.vala | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/engine/imap-db/imap-db-message-addresses.vala
b/src/engine/imap-db/imap-db-message-addresses.vala
index f25f547..d46ed35 100644
--- a/src/engine/imap-db/imap-db-message-addresses.vala
+++ b/src/engine/imap-db/imap-db-message-addresses.vala
@@ -126,6 +126,9 @@ private class Geary.ImapDB.MessageAddresses : BaseObject {
private void add_contact(Gee.Map<string, Contact> contacts_map, RFC822.MailboxAddress address,
int importance) {
+ if (!address.is_valid())
+ return;
+
Contact contact = new Contact.from_rfc822_address(address, importance);
Contact? old_contact = contacts_map[contact.normalized_email];
if (old_contact == null || old_contact.highest_importance < contact.highest_importance)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]