[geary/wip/composer-folks: 21/22] Ensure Geary.ContactStoreImpl validates UTF-8 strings



commit dd9d0664054ef87ccb8a9d3ab1f5392b389aa0f2
Author: Michael Gratton <mike vee net>
Date:   Sat Jun 15 16:53:17 2019 +1000

    Ensure Geary.ContactStoreImpl validates UTF-8 strings

 src/engine/common/common-contact-store-impl.vala | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/engine/common/common-contact-store-impl.vala 
b/src/engine/common/common-contact-store-impl.vala
index 257b80e3..433213bd 100644
--- a/src/engine/common/common-contact-store-impl.vala
+++ b/src/engine/common/common-contact-store-impl.vala
@@ -70,10 +70,11 @@ internal class Geary.ContactStoreImpl : BaseObject, Geary.ContactStore {
                                       string email,
                                       GLib.Cancellable? cancellable)
         throws GLib.Error {
+        string normalised_query = email.make_valid();
         Db.Statement stmt = cx.prepare(
             "SELECT real_name, highest_importance, normalized_email, flags FROM ContactTable "
             + "WHERE email=?");
-        stmt.bind_string(0, email);
+        stmt.bind_string(0, normalised_query);
 
         Db.Result result = stmt.exec(cancellable);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]