Perl filtering, pathological patterns

Marco d'Itri md at Linux.IT
Tue Mar 20 13:28:57 UTC 2001

On Mar 20, Russ Allbery <rra at> wrote:

 ># How we determine if a post is a binary.
 >sub is_binary {
 >    ($hdr{__BODY__} =~ m%(?:^[ \t>]*(?>M[\x20-\x60]{59,60})[ \r]*\n){40}%mo
 >     || $hdr{__BODY__} =~ m%(?:^[ \t>]*[A-Za-z0-9+/]{59,76}[ \r]*\n){40}%mo);
The latest cleanfeed beta I have (3 December 1999, does anybody have a
newer one?) has this code in is_binary():

    if (($hdr{'__BODY__'} =~
         /(?:^[\t >]*M$uu_chars{60,61}[\t ]*\r?\n){$config{'max_encoded_lines'}}/mo) ||
        ($hdr{'__BODY__'} =~
         /(?:^[\t >]*$base64_chars{59,76}[\t ]*\r?\n){$config{'max_encoded_lines'}}/mo)) {

So it appears that 59 characters wide uuencoded lines are not common.


More information about the inn-workers mailing list