FreeBSD Bugzilla – Attachment 75960 Details for
Bug 109607
[patch] mail/dbmail: rfc822-conformant headername processing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.46 KB, created by
Mark Starovoytov
on 2007-02-27 15:50:07 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Mark Starovoytov
Created:
2007-02-27 15:50:07 UTC
Size:
1.46 KB
patch
obsolete
>diff -urN ./dbmail.orig/Makefile ./dbmail/Makefile >--- ./dbmail.orig/Makefile Wed Feb 14 01:05:53 2007 >+++ ./dbmail/Makefile Tue Feb 27 18:30:57 2007 >@@ -7,6 +7,7 @@ > > PORTNAME= dbmail > PORTVERSION= 2.2.2 >+PORTREVISION= 1 > CATEGORIES= mail > MASTER_SITES= http://www.dbmail.org/download/2.2/ > >diff -urN ./dbmail.orig/files/patch-rfc822_headername_case ./dbmail/files/patch-rfc822_headername_case >--- ./dbmail.orig/files/patch-rfc822_headername_case Thu Jan 1 03:00:00 1970 >+++ ./dbmail/files/patch-rfc822_headername_case Tue Feb 27 18:26:38 2007 >@@ -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);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 109607
: 75960