Re: [exim] caution to those blocking files by extension

Pàgina inicial
Delete this message
Reply to this message
Autor: Stephen Gran
Data:  
A: exim-users
Assumpte: Re: [exim] caution to those blocking files by extension
On Fri, Nov 03, 2006 at 03:34:15PM +0200, Brent Clark said:
>
> Hey all
>
> I just found a hole / bug in my acl for file extension handling.
>
> This is my current ACL
>
> # File extension filtering.
> deny   set acl_m1 = ${extract{-1}{.}{${lc:$mime_filename}}}
> message  = Disallowed file extension
> log_message     = REJECTED ATTACHMENT ($acl_m1) (rcpt to: $recipients)

>
> condition       = ${if match{$acl_m1}{\N^(

[...]
>                                          )$\N}{1}{0}}


The bug is that you start your regex expects there to be no whitespace
between the final dot and the beginning of the extension. You'll want
to allow optional whitespace at the beginning (and probably the end) of
your regex.
--
--------------------------------------------------------------------------
|  Stephen Gran                  | Office Automation:  The use of          |
|  steve@???             | computers to improve efficiency in the  |
|  http://www.lobefin.net/~steve | office  by removing anyone you would    |
|                                | want to talk with over coffee.          |

--------------------------------------------------------------------------