aboutsummaryrefslogtreecommitdiffstats
path: root/mail/dbmail
diff options
context:
space:
mode:
authorclsung <clsung@FreeBSD.org>2007-02-28 00:18:03 +0800
committerclsung <clsung@FreeBSD.org>2007-02-28 00:18:03 +0800
commitd426b54fe80c375da1a75acb6cadf3901e598cb2 (patch)
tree8c51ede3d113d45600dff101aff0a04ae009ac34 /mail/dbmail
parent9a15a64ab16113789e81bd52b9fa8df4f965c570 (diff)
downloadfreebsd-ports-gnome-d426b54fe80c375da1a75acb6cadf3901e598cb2.tar.gz
freebsd-ports-gnome-d426b54fe80c375da1a75acb6cadf3901e598cb2.tar.zst
freebsd-ports-gnome-d426b54fe80c375da1a75acb6cadf3901e598cb2.zip
- Headernames should be processed case-insensitively according to RFC822 3.4.7.
- Problem reported by Larry Rosenman. Patch for the problem was on the dbmail-dev list. - bump PORTREVISION PR: ports/109607 Submitted by: maintainer (Mark Starovoytov)
Diffstat (limited to 'mail/dbmail')
-rw-r--r--mail/dbmail/Makefile1
-rw-r--r--mail/dbmail/files/patch-rfc822_headername_case26
2 files changed, 27 insertions, 0 deletions
diff --git a/mail/dbmail/Makefile b/mail/dbmail/Makefile
index a7b3b25184ad..c1d819a75e95 100644
--- a/mail/dbmail/Makefile
+++ b/mail/dbmail/Makefile
@@ -7,6 +7,7 @@
PORTNAME= dbmail
PORTVERSION= 2.2.2
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://www.dbmail.org/download/2.2/
diff --git a/mail/dbmail/files/patch-rfc822_headername_case b/mail/dbmail/files/patch-rfc822_headername_case
new file mode 100644
index 000000000000..1148c5e2a85b
--- /dev/null
+++ b/mail/dbmail/files/patch-rfc822_headername_case
@@ -0,0 +1,26 @@
+--- dbmail-message.c
++++ dbmail-message.c
+@@ -885,9 +885,13 @@ static int _header_get_id(const struct D
+ u64_t tmp;
+ gpointer cacheid;
+ gchar *safe_header;
++ gchar *tmpheader;
+
+- if (! (safe_header = dm_strnesc(header,CACHE_WIDTH_NAME)))
++ // rfc822 headernames are case-insensitive
++ if (! (tmpheader = dm_strnesc(header,CACHE_WIDTH_NAME)))
+ return -1;
++ safe_header = g_ascii_strdown(tmpheader,-1);
++ g_free(tmpheader);
+
+ cacheid = g_hash_table_lookup(self->header_dict, (gconstpointer)safe_header);
+ if (cacheid) {
+@@ -897,7 +901,7 @@ static int _header_get_id(const struct D
+ }
+
+ GString *q = g_string_new("");
+- g_string_printf(q, "SELECT id FROM %sheadername WHERE headername='%s'", DBPFX, safe_header);
++ g_string_printf(q, "SELECT id FROM %sheadername WHERE lower(headername)='%s'", DBPFX, safe_header);
+ if (db_query(q->str) == -1) {
+ g_string_free(q,TRUE);
+ g_free(safe_header);