You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by David B Funk <db...@engineering.uiowa.edu> on 2004/06/07 02:07:27 UTC
Case InsEnsiTive uri dection?
The uri parser in PerMsgStatus.pm is case senitive.
IE it will recognize a uri like:
http://bad-site.com/add/garbage.html
but not:
hTTp://bad-site.com/add/garbage.html
Recently found a FN that contained add site references that
looked like that. None of my uri rules fired, just editing the
spam and changing the "hTTp" to "http" let the uri rules fire.
Line 1683 of PerMsgStatus.pm has:
my $schemeRE = qr/(?:https?|ftp|mailto|javascript|file)/;
Any reason -not- to make it:
my $schemeRE = qr/(?:https?|ftp|mailto|javascript|file)/i;
--
Dave Funk University of Iowa
<dbfunk (at) engineering.uiowa.edu> College of Engineering
319/335-5751 FAX: 319/384-0549 1256 Seamans Center
Sys_admin/Postmaster/cell_admin Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{
Re: Case InsEnsiTive uri dection?
Posted by "Steven W. Orr" <st...@syslang.net>.
On Sunday, Jun 6th 2004 at 19:07 -0500, quoth David B Funk:
=>The uri parser in PerMsgStatus.pm is case senitive.
=>IE it will recognize a uri like:
=> http://bad-site.com/add/garbage.html
=>
=>but not:
=> hTTp://bad-site.com/add/garbage.html
=>
=>Recently found a FN that contained add site references that
=>looked like that. None of my uri rules fired, just editing the
=>spam and changing the "hTTp" to "http" let the uri rules fire.
=>
=>Line 1683 of PerMsgStatus.pm has:
=>
=> my $schemeRE = qr/(?:https?|ftp|mailto|javascript|file)/;
=>
=>Any reason -not- to make it:
=>
=> my $schemeRE = qr/(?:https?|ftp|mailto|javascript|file)/i;
Good functionality suggestion, but the wrong fix.
Only the domain part should have the /i applied to it. The filename
component is case sensitive. e.g., if the URI was
hTTp://bad-site.com/add/garBage.html
then the comparison would have been less accuraate.
--
Time flies like the wind. Fruit flies like a banana. Stranger things have .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net
Re: Case InsEnsiTive uri dection?
Posted by Loren Wilton <lw...@earthlink.net>.
> The uri parser in PerMsgStatus.pm is case senitive.
> IE it will recognize a uri like:
> http://bad-site.com/add/garbage.html
>
> but not:
> hTTp://bad-site.com/add/garbage.html
Fixed in 3.0, among many other URI parsing changes (like catching
redirections).
In the mean time, RulesEmporium I believe has a set of obfuscated URI rules
that will catch a lot of the things that you are seeing.
Loren