Discussion:
[Mimedefang] utf-8 issue?
Alexey Lobanov
2018-06-25 14:17:13 UTC
Permalink
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list ***@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Dianne Skoll
2018-06-27 22:51:45 UTC
Permalink
Hi,

Can you post the relevant part of your filter code that triggers
this problem?

Also, MIME::tools 5.009 doesn't exist; I assume it was a typo and
you meant 5.509?

Regards,

Dianne.

_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list ***@lists.roaringpenguin.com
http://lists.roaringpenguin.c
Alexey Lobanov
2018-06-28 07:57:06 UTC
Permalink
Hi.
Post by Dianne Skoll
Hi,
Can you post the relevant part of your filter code that triggers
this problem?
It is default code with extended extension list. Trojan writers like
these file types novadays.

==========

sub filter_bad_filename  {
    my($entity) = @_;
    my($bad_exts, $re);

    # Bad extensions
    $bad_exts =
'(arj|rar|r15|lzh|uue|7z|xz|xlsm|epf|docm|dotm|dot|tgz|ace|z|gz|ace|jar|ade|adp|app|asd|asf|asx|bas|bat|cab|chm|cmd|com|cpl|dll|exe|fxp|hlp|hta|hto|inf|ini|ins|isp|jse?|lib|lnk|mdb|mde|msc|msi|msp|mst|ocx|pcd|pif|prg|reg|scr|sct|sh|shb|shs|sys|vb|vbe|vbs|vxd|wsc|wsf|wsh|\{[^\}]+\})';

    # Do not allow:
    # - CLSIDs  {foobarbaz}
    # - bad extensions (possibly with trailing dots) at end
    $re = '\.' . $bad_exts . '\.*$';

    return 1 if (re_match($entity, $re));

    # Look inside ZIP files
    if (re_match($entity, '\.zip$') and
        $Features{"Archive::Zip"}) {
        my $bh = $entity->bodyhandle();
        if (defined($bh)) {
            my $path = $bh->path();
            if (defined($path)) {
                return re_match_in_zip_directory($path, $re);
            }
        }
    }
    return 0;
}

================
Post by Dianne Skoll
Also, MIME::tools 5.009 doesn't exist; I assume it was a typo and
you meant 5.509?
Correct. Just mistype.

--
Alexey
Post by Dianne Skoll
Regards,
Dianne.
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.
Visit http://www.mimedefang.org and http://www.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list ***@lists.roaringpenguin.com
http:
Dianne Skoll
2018-06-28 16:13:30 UTC
Permalink
On Thu, 28 Jun 2018 10:57:06 +0300
Post by Alexey Lobanov
It is default code with extended extension list. Trojan writers like
these file types novadays.
Ah, OK, the re_match routine in MIMEDefang won't handle wide characters
properly. I'll look into fixing it for a future release. I can't promise
a delivery date as I'm currently recovering from major surgery and don't
have the energy to do much work in a given day. :(

Regards,

Dianne.
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list ***@lists.roaringpenguin.com
http://lists.roaringpenguin

Loading...