dovecot-1.2-sieve: Removed header MIME-decoding in address test ...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Sun Jan 23 15:34:46 EET 2011
details: http://hg.rename-it.nl/dovecot-1.2-sieve/rev/67a9acd1de09
changeset: 1283:67a9acd1de09
user: Stephan Bosch <stephan at rename-it.nl>
date: Sun Jan 23 14:31:43 2011 +0100
description:
Removed header MIME-decoding in address test and vacation command implementations to prevent address parsing problems.
diffstat:
src/lib-sieve/plugins/vacation/cmd-vacation.c | 2 +-
src/lib-sieve/tst-address.c | 2 +-
tests/address.svtest | 23 +++++++++++++++++++++++
3 files changed, 25 insertions(+), 2 deletions(-)
diffs (54 lines):
diff -r 846a4ae3b5a4 -r 67a9acd1de09 src/lib-sieve/plugins/vacation/cmd-vacation.c
--- a/src/lib-sieve/plugins/vacation/cmd-vacation.c Mon Oct 04 23:08:24 2010 +0200
+++ b/src/lib-sieve/plugins/vacation/cmd-vacation.c Sun Jan 23 14:31:43 2011 +0100
@@ -1094,7 +1094,7 @@
*/
hdsp = _my_address_headers;
while ( *hdsp != NULL ) {
- if ( mail_get_headers_utf8
+ if ( mail_get_headers
(msgdata->mail, *hdsp, &headers) >= 0 && headers[0] != NULL ) {
if ( _contains_my_address(headers, recipient) ) {
diff -r 846a4ae3b5a4 -r 67a9acd1de09 src/lib-sieve/tst-address.c
--- a/src/lib-sieve/tst-address.c Mon Oct 04 23:08:24 2010 +0200
+++ b/src/lib-sieve/tst-address.c Sun Jan 23 14:31:43 2011 +0100
@@ -267,7 +267,7 @@
&& hdr_item != NULL ) {
const char *const *headers;
- if ( mail_get_headers_utf8
+ if ( mail_get_headers
(renv->msgdata->mail, str_c(hdr_item), &headers) >= 0 ) {
int i;
diff -r 846a4ae3b5a4 -r 67a9acd1de09 tests/address.svtest
--- a/tests/address.svtest Mon Oct 04 23:08:24 2010 +0200
+++ b/tests/address.svtest Sun Jan 23 14:31:43 2011 +0100
@@ -109,3 +109,26 @@
}
+/*
+ * TEST: Erroneous mime encoding
+ */
+
+test_set "message" text:
+From: "William Wallace <william at scotsmen.ex>"
+To: "=?UTF-8?B?IkR1bWIgTWFpbGVyIg==?="
+ <horde at lists.scotsmen.ex>
+Subject: Test
+
+Frop!
+.
+;
+
+
+test "Erroneous mime encoding" {
+ # Relevant sieve rule:
+
+ if not address :is ["To","CC"] ["horde at lists.scotsmen.ex","archers at lists.scotsmen.ex"] {
+ test_fail "Failed to match improperly encoded address headers";
+ }
+}
+
More information about the dovecot-cvs
mailing list