[balsa/gmime3: 51/51] autocrypt: Convert e-mail addresses to lowercase.
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gmime3: 51/51] autocrypt: Convert e-mail addresses to lowercase.
- Date: Thu, 2 Jan 2020 16:16:29 +0000 (UTC)
commit a1c8b1591a260f6f4a23bbd8600969e0a30965e2
Author: Albrecht Dreß <albrecht dress arcor de>
Date: Sat Nov 30 19:14:05 2019 -0500
autocrypt: Convert e-mail addresses to lowercase.
modified: libbalsa/autocrypt.c
libbalsa/autocrypt.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/libbalsa/autocrypt.c b/libbalsa/autocrypt.c
index b993ccaed..86fb1a820 100644
--- a/libbalsa/autocrypt.c
+++ b/libbalsa/autocrypt.c
@@ -133,13 +133,13 @@ gboolean
autocrypt_init(GError **error)
{
static const gchar * const prepare_statements[NUM_QUERIES] = {
- "SELECT * FROM autocrypt WHERE LOWER(addr) = ?",
- "INSERT INTO autocrypt VALUES (?1, ?2, ?2, ?3, ?4, ?5, ?6)",
+ "SELECT * FROM autocrypt WHERE addr = LOWER(?)",
+ "INSERT INTO autocrypt VALUES (LOWER(?1), ?2, ?2, ?3, ?4, ?5, ?6)",
"UPDATE autocrypt SET last_seen = MAX(?2, last_seen), ac_timestamp = ?2, pubkey = ?3,
fingerprint = ?4,"
- " expires = ?5, prefer_encrypt = ?6 WHERE addr = ?1",
- "UPDATE autocrypt SET last_seen = ?2 WHERE addr = ?1 AND last_seen < ?2 AND ac_timestamp <
?2",
+ " expires = ?5, prefer_encrypt = ?6 WHERE addr = LOWER(?1)",
+ "UPDATE autocrypt SET last_seen = ?2 WHERE addr = LOWER(?1) AND last_seen < ?2 AND
ac_timestamp < ?2",
"SELECT pubkey FROM autocrypt WHERE fingerprint LIKE ?",
- "SELECT addr, last_seen, ac_timestamp, prefer_encrypt, pubkey FROM autocrypt ORDER BY
LOWER(addr) ASC"
+ "SELECT addr, last_seen, ac_timestamp, prefer_encrypt, pubkey FROM autocrypt ORDER BY addr
ASC"
};
gboolean result;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]