ENGINE-171: initial commit - doesn't break current lookups. Now to test the two weird ones we want. ENGINE-171
authorKrista Bennett <krista@pep-project.org>
Fri, 16 Jun 2017 13:52:07 +0200
branchENGINE-171
changeset 1868a3bf01e38752
parent 1866 cc57e29989a4
child 1884 3e00ee967471
ENGINE-171: initial commit - doesn't break current lookups. Now to test the two weird ones we want.
src/pEpEngine.c
     1.1 --- a/src/pEpEngine.c	Thu Jun 15 18:49:12 2017 +0200
     1.2 +++ b/src/pEpEngine.c	Fri Jun 16 13:52:07 2017 +0200
     1.3 @@ -27,7 +27,10 @@
     1.4      "   join pgp_keypair on fpr = identity.main_key_id"
     1.5      "   join trust on id = trust.user_id"
     1.6      "       and pgp_keypair_fpr = identity.main_key_id"
     1.7 -    "   where address = ?1 and identity.user_id = ?2;";
     1.8 +    "   where (address = ?1" 
     1.9 +    "              or (address = ?1 collate nocase)"
    1.10 +    "              or (replace(address,'.','') = replace(?1,'.','')))"
    1.11 +    "   and identity.user_id = ?2;";
    1.12  
    1.13  static const char *sql_replace_identities_fpr =  
    1.14      "update identity"