SA Bugzilla – Bug 5493
[review] sa-compile not correctly parsing escaped backslashes
Last modified: 2007-12-16 13:21:26 UTC
sa-compile, when extracting the regex's into the scanner*.re files, seems to interpret backslahses as either '\"' or '\""'. Here's the example I used on the sa-users mailing list... Original rule's regex: /(?:fr(?:o|0|\(\))(?:n|\|\\\|)[t7]p[a\@4]g[e3]\s\d+)/i Scanner.re result: "fro|\""|" {RET("__XM_Sft_Ms_Fp_L33T");} It produces the above output, instead of "fro|\|". This comes from the file in the URL field of this ticket. Do an sa-compile with the file in your spamassassin config, and you'll see this and a few more examples of the same thing. I've even tried escaping it with the hex code for a backlash, but I get the same results. :-/ Always either '\"' or '\""'.
thanks, this is fixed by the patch to follow, which I've just applied to trunk: : jm 144...; svn commit -m "bug 5493: sa-compile would not correctly deal with escap ed backslashes, fix" sa-compile.raw Sending sa-compile.raw Transmitting file data . Committed revision 567486.
Created attachment 4100 [details] fix
marking major; sa-compile should not die on valid input
bump ...
+1
now in 3.2.x: r604707