URL-encoded filenames in reports
Stephane
sleclerc at actionweb.fr
Sat Mar 17 21:46:16 CET 2007
Rick Chadderdon <mailscanner <at> yeticomputers.com> writes:
>
> Simon Walter wrote:
> > Hello
> >
> > Is there a way to get the filename of files which got stored in
> > quarantine as url-encoded string?
> >
> > Using $filename in reportfiles doesn't work for files with spaces or
> > special characters if the filename is used as part of an url.
> >
> > See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=410647
> >
>
> I would probably handle this with PHP. The line in my corresponding
> report .txt file would be something like:
>
>
http://my.mailscannerbox.com/download.php?id=$id&filename=$filename&datenumber=$datenumber&hostname=$hostname
> and I would use my script to handle directing people to the correct file.
>
> Unfortunately, I have too many users who would retrieve *any* file -
> virus, spam or other - to give them this kind of a tool.
>
> I just fiddled with it a little bit, and it seems as if this would work
> just fine. Now you made me want to test it...
>
> Rick
>
In fact, the problem is with $filename itself in Mailscanner. If the variable
contains something as "WSComparison_#.DOC" or "WHform for summer 2008.doc", no
way to passe this in an URL.
I've on my side this kind of command.
http://quarantine.tld/download.php?hostname=godalnet&date=20070317&id=1HSb00-0002U3-7R&filename=WSComparison_#.DOC
We need a key or a simple urlencode version of $filename. An $URLfilename will
be great. Or may be another solution that I haven't discovered.
Stephane
More information about the MailScanner
mailing list