[PATCH] obscured URL not being tokenized

David Relson relson at osagesoftware.com
Sun Dec 21 15:55:03 CET 2003


Dan,

I've got a patch to fix the processing of encoded URLs.  Give it a try
and let me know how well it works for you.

David
-------------- next part --------------
Index: lexer_v3.l
===================================================================
RCS file: /cvsroot/bogofilter/bogofilter/src/lexer_v3.l,v
retrieving revision 1.127
diff -u -r1.127 lexer_v3.l
--- lexer_v3.l	11 Dec 2003 14:12:47 -0000	1.127
+++ lexer_v3.l	21 Dec 2003 14:51:48 -0000
@@ -288,7 +286,7 @@
 {TOKEN}						{ return TOKEN;}
 
 <HTML>{TOKEN_12}?{HTML_ENCODING}		{ html_char(); }	/* process escaped chars, eg 'e' is 'a' */
-<HTOKEN>{TOKEN_12}?{URL_ENCODING}+		{ url_char(); }		/* process escaped chars, eg '%61'    is 'a' */
+<HTOKEN>[^/]*{URL_ENCODING}+			{ url_char(); }		/* process escaped chars, eg '%61'    is 'a' */
 
 \${NUM}(\.{NUM})?				{ return TOKEN;}	/* Dollars and cents */
 



More information about the bogofilter mailing list