[balsa/gmime3: 50/50] autocrypt: Convert e-mail addresses to lowercase.
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gmime3: 50/50] autocrypt: Convert e-mail addresses to lowercase.
- Date: Tue, 7 Jan 2020 16:56:13 +0000 (UTC)
commit 6fd1cc50b98ae2a79b63dc7829cbc727cbf73f85
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]