Line 0
Link Here
|
|
|
1 |
Index: src/version.sh |
2 |
=================================================================== |
3 |
--- src/version.sh (revision 6820) |
4 |
+++ src/version.sh (revision 6838) |
5 |
@@ -4,8 +4,8 @@ |
6 |
# |
7 |
# create version.c to define BOGOFILTER_VERSION |
8 |
# |
9 |
-# if VERSION in config.h does not contain 'cvs', use its value. |
10 |
-# if it does contain 'cvs', append a date to it. |
11 |
+# if VERSION in config.h does not contain 'svn', use its value. |
12 |
+# if it does contain 'svn', append a date to it. |
13 |
# |
14 |
# We'll first try to find CVS/Entries files and use the most |
15 |
# current date from the files. To parse, we need Perl 5 and |
16 |
Index: src/tests/inputs/mime-qp-cont-with-cr.txt |
17 |
=================================================================== |
18 |
--- src/tests/inputs/mime-qp-cont-with-cr.txt (revision 0) |
19 |
+++ src/tests/inputs/mime-qp-cont-with-cr.txt (revision 6838) |
20 |
@@ -0,0 +1,31 @@ |
21 |
+Subject: This is a test message to check bogofilter's qp decoding of |
22 |
+ continuation lines in the presence of spurious CR characters. |
23 |
+MIME-Version: 1.0 |
24 |
+Content-Type: multipart/alternative; |
25 |
+ boundary="----=_NextPart_000_0007_01C9DC27.B9F73130" |
26 |
+ |
27 |
+This is a multi-part message in MIME format. |
28 |
+ |
29 |
+------=_NextPart_000_0007_01C9DC27.B9F73130 |
30 |
+Content-Type: text/html; |
31 |
+ charset="iso-8859-2" |
32 |
+Content-Transfer-Encoding: quoted-printable |
33 |
+ |
34 |
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
35 |
+<HTML><HEAD> |
36 |
+<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-2"= |
37 |
+> |
38 |
+<META content=3D"MSHTML 6.00.2800.1506" name=3DGENERATOR> |
39 |
+<STYLE></STYLE> |
40 |
+</HEAD> |
41 |
+<BODY> |
42 |
+<DIV align=3Dcenter><FONT face=3DArial size=3D2>50mg x 10 pills $6.00 per p= |
43 |
+ill</FONT></DIV> |
44 |
+<DIV align=3Dcenter><FONT face=3DArial size=3D2></FONT> </DIV> |
45 |
+<DIV align=3Dcenter><FONT face=3DArial size=3D2> |
46 |
+<A href=3D"http://groups.yahoo.com/group/ganebawusexut64/message/1">Visit h= |
47 |
+ere</A></FONT></DIV> |
48 |
+</BODY></HTML> |
49 |
+ |
50 |
+------=_NextPart_000_0007_01C9DC27.B9F73130-- |
51 |
+ |
52 |
|
53 |
Property changes on: src/tests/inputs/mime-qp-cont-with-cr.txt |
54 |
___________________________________________________________________ |
55 |
Added: svn:eol-style |
56 |
+ native |
57 |
|
58 |
Index: src/tests/t.frame |
59 |
=================================================================== |
60 |
--- src/tests/t.frame (revision 6820) |
61 |
+++ src/tests/t.frame (revision 6838) |
62 |
@@ -39,7 +39,7 @@ |
63 |
export _POSIX2_VERSION |
64 |
|
65 |
# Obtain data base file suffix |
66 |
-DB_NAME=$("$BOGOFILTER" -C -V 2>&1 | sed -n '/Database:/ { p;q }') |
67 |
+DB_NAME=$("$BOGOFILTER" -C -V 2>&1 | sed -n '/Database:/ {p;q;}') |
68 |
case $DB_NAME in |
69 |
*BerkeleyDB*|*"Berkeley DB"*) |
70 |
case $DB_NAME in |
71 |
Index: src/tests/outputs/mime-qp-cont-with-cr.exp |
72 |
=================================================================== |
73 |
--- src/tests/outputs/mime-qp-cont-with-cr.exp (revision 0) |
74 |
+++ src/tests/outputs/mime-qp-cont-with-cr.exp (revision 6838) |
75 |
@@ -0,0 +1,50 @@ |
76 |
+subj:This |
77 |
+subj:test |
78 |
+subj:message |
79 |
+subj:check |
80 |
+subj:bogofilter's |
81 |
+subj:decoding |
82 |
+subj:continuation |
83 |
+subj:lines |
84 |
+subj:the |
85 |
+subj:presence |
86 |
+subj:spurious |
87 |
+subj:characters |
88 |
+head:MIME-Version |
89 |
+head:Content-Type |
90 |
+head:multipart |
91 |
+head:alternative |
92 |
+This |
93 |
+multi-part |
94 |
+message |
95 |
+MIME |
96 |
+format |
97 |
+mime:Content-Type |
98 |
+mime:text |
99 |
+mime:html |
100 |
+mime:charset |
101 |
+mime:iso-8859-2 |
102 |
+mime:Content-Transfer-Encoding |
103 |
+mime:quoted-printable |
104 |
+face |
105 |
+Arial |
106 |
+size |
107 |
+pills |
108 |
+$6.00 |
109 |
+per |
110 |
+pill |
111 |
+face |
112 |
+Arial |
113 |
+size |
114 |
+nbsp |
115 |
+face |
116 |
+Arial |
117 |
+size |
118 |
+href |
119 |
+http |
120 |
+groups.yahoo.com |
121 |
+group |
122 |
+ganebawusexut64 |
123 |
+message |
124 |
+Visit |
125 |
+here |
126 |
Index: src/tests/t.lexer.qpcr |
127 |
=================================================================== |
128 |
--- src/tests/t.lexer.qpcr (revision 0) |
129 |
+++ src/tests/t.lexer.qpcr (revision 6838) |
130 |
@@ -0,0 +1,16 @@ |
131 |
+#! /bin/sh |
132 |
+ |
133 |
+# This check sees if bogofilter can reassemble lines with spurious CR |
134 |
+# during QP decoding. It used to fail up to and including 1.2.0 with |
135 |
+# lines ending in =<CR>, not considering these as continuation. |
136 |
+ |
137 |
+. ${srcdir:=.}/t.frame |
138 |
+ |
139 |
+ifn=mime-qp-cont-with-cr.txt |
140 |
+ofn=mime-qp-cont-with-cr.out |
141 |
+efn=mime-qp-cont-with-cr.exp |
142 |
+ |
143 |
+cat "$srcdir/inputs/$ifn" \ |
144 |
+| $BOGOLEXER -p -C > "$TMPDIR/$ofn" |
145 |
+ |
146 |
+exec diff $DIFF_BRIEF "$OUTPUTS/$efn" "$TMPDIR/$ofn" |
147 |
Index: src/tests/Makefile.am |
148 |
=================================================================== |
149 |
--- src/tests/Makefile.am (revision 6820) |
150 |
+++ src/tests/Makefile.am (revision 6838) |
151 |
@@ -38,7 +38,7 @@ |
152 |
t.passthrough-hb \ |
153 |
t.escaped.html t.escaped.url \ |
154 |
t.split t.parsing \ |
155 |
- t.lexer t.lexer.mbx \ |
156 |
+ t.lexer t.lexer.mbx t.lexer.qpcr \ |
157 |
t.spam.header.place \ |
158 |
t.block.on.subnets \ |
159 |
t.token.count \ |
160 |
@@ -49,16 +49,19 @@ |
161 |
|
162 |
WORDLIST_TESTS = t.dump.load t.nonascii.replace t.maint t.robx t.regtest t.upgrade.subnet.prefix t.multiple.wordlists t.probe t.bf_compact |
163 |
|
164 |
-SCORING_TESTS = t.query.config t.score1 t.score2 t.systest t.grftest t.wordhist |
165 |
+SCORING_TESTS = t.score1 t.score2 t.systest t.grftest t.wordhist |
166 |
|
167 |
BULKMODE_TESTS = t.bulkmode t.MH t.maildir t.bogoutil |
168 |
|
169 |
INTEGRITY_TESTS = t.lock1 t.lock3 t.valgrind |
170 |
# INTEGRITY_TESTS += t.lock2 |
171 |
|
172 |
+# these tests are built, but must not be shipped: |
173 |
+BUILT_TESTS = t.query.config |
174 |
+ |
175 |
TESTSCRIPTS = ${ENVIRON_TESTS} ${PARSING_TESTS} ${WORDLIST_TESTS} ${SCORING_TESTS} ${BULKMODE_TESTS} ${INTEGRITY_TESTS} |
176 |
|
177 |
-TESTS=$(TESTSCRIPTS) |
178 |
+TESTS=$(BUILT_TESTS) $(TESTSCRIPTS) |
179 |
|
180 |
TESTS_ENVIRONMENT=RUN_FROM_MAKE=1 AWK=$(AWK) srcdir=$(srcdir) SHELL="$(SHELL)" $(SHELL) $(VERBOSE) |
181 |
|
182 |
@@ -73,6 +76,7 @@ |
183 |
inputs/lexer.inp \ |
184 |
inputs/lexer.mbx \ |
185 |
inputs/lexer.out \ |
186 |
+ inputs/mime-qp-cont-with-cr.txt \ |
187 |
inputs/msg.1.txt \ |
188 |
inputs/msg.2.txt \ |
189 |
inputs/msg.3.txt \ |
190 |
@@ -103,6 +107,7 @@ |
191 |
outputs/maildir.out \ |
192 |
outputs/message_addr.ref \ |
193 |
outputs/message_id.ref \ |
194 |
+ outputs/mime-qp-cont-with-cr.exp \ |
195 |
outputs/msg.1.v \ |
196 |
outputs/msg.2a.vv \ |
197 |
outputs/msg.2a.vvv \ |
198 |
Index: src/Makefile.am |
199 |
=================================================================== |
200 |
--- src/Makefile.am (revision 6820) |
201 |
+++ src/Makefile.am (revision 6838) |
202 |
@@ -254,8 +254,7 @@ |
203 |
fgetsl_test_CFLAGS= -DMAIN |
204 |
|
205 |
# what to distribute |
206 |
-EXTRA_DIST = $(bin_SCRIPTS) \ |
207 |
- bogoupgrade.in \ |
208 |
+EXTRA_DIST = bogoupgrade.in \ |
209 |
version.sh \ |
210 |
strlcat.3 strlcpy.3 \ |
211 |
patch.lexer.254.txt patch.lexer.253x.txt |
212 |
Index: src/qp.c |
213 |
=================================================================== |
214 |
--- src/qp.c (revision 6820) |
215 |
+++ src/qp.c (revision 6838) |
216 |
@@ -41,6 +41,10 @@ |
217 |
} |
218 |
} |
219 |
|
220 |
+/* Function Prototypes */ |
221 |
+ |
222 |
+static int qp_eol_check(byte *s, byte *e); |
223 |
+ |
224 |
/* Function Definitions */ |
225 |
|
226 |
uint qp_decode(word_t *word, qp_mode mode) |
227 |
@@ -56,10 +60,13 @@ |
228 |
int x, y; |
229 |
switch (ch) { |
230 |
case '=': |
231 |
- if (mode == RFC2045 && s + 1 <= e && s[0] == '\n') { |
232 |
- /* continuation line, trailing = */ |
233 |
- s++; |
234 |
- continue; |
235 |
+ if (mode == RFC2045) { |
236 |
+ int c = qp_eol_check(s, e); |
237 |
+ if (c != 0) { |
238 |
+ /* continuation line, trailing = */ |
239 |
+ s += c; |
240 |
+ continue; |
241 |
+ } |
242 |
} |
243 |
if (s + 2 <= e && |
244 |
(y = hex_to_bin(s[0])) >= 0 && (x = hex_to_bin(s[1])) >= 0) { |
245 |
@@ -129,3 +136,22 @@ |
246 |
|
247 |
return true; |
248 |
} |
249 |
+ |
250 |
+static int qp_eol_check(byte *s, byte *e) |
251 |
+{ |
252 |
+ if (s + 1 <= e) { |
253 |
+ /* test for LF */ |
254 |
+ if (s[0] == '\n') |
255 |
+ { |
256 |
+ /* only LF */ |
257 |
+ return 1; |
258 |
+ } |
259 |
+ |
260 |
+ if (s[0] == '\r' |
261 |
+ && s + 2 <= e && s[1] == '\n') |
262 |
+ /* CR LF */ |
263 |
+ return 2; |
264 |
+ } |
265 |
+ |
266 |
+ return 0; |
267 |
+} |
268 |
Index: NEWS |
269 |
=================================================================== |
270 |
--- NEWS (revision 6820) |
271 |
+++ NEWS (revision 6838) |
272 |
@@ -15,8 +15,19 @@ |
273 |
|
274 |
------------------------------------------------------------------------------- |
275 |
|
276 |
-1.2.0 2009-02-21 (released) |
277 |
+ 2009-05-28 |
278 |
+ * Removed two scripts that are auto-built. |
279 |
+ * Added test case for Stephen Davies' Q-P EOL problem (see below). |
280 |
|
281 |
+ 2009-05-25 |
282 |
+ * Fixed EOL problem in quoted_printable text. Problem reported by |
283 |
+ Stephen Davies and identified by Pavel Kankovsky. |
284 |
+ |
285 |
+ 2009-03-28 |
286 |
+ * Promoted to "stable" |
287 |
+ |
288 |
+1.2.0 2009-02-21 (released) |
289 |
+ |
290 |
2009-02-20 |
291 |
* Flex-2.5.35 has fix for memory allocation problem in 2.5.4, |
292 |
2.5.31, and 2.5.33, making bogofilter's flex patch obsolete. |
293 |
@@ -70,8 +81,11 @@ |
294 |
systems to do that are reported to be shipped in 1987 by the autoconf |
295 |
manual, so ditch them. |
296 |
|
297 |
-1.1.7 2008-05-04 (released) |
298 |
+ 2008-05-18 |
299 |
+ * Promoted to "stable" |
300 |
|
301 |
+1.1.7 2008-05-04 (released) |
302 |
+ |
303 |
2008-04-30 |
304 |
|
305 |
* Updated sendmail milter contrib/bogofilter-milter.pl to v1.45 |