Re: filename problem

From: G G Papazoglou <grp_at_med.uoc.gr_at_hypermail-project.org>
Date: Sun, 21 Nov 2004 01:34:11 +0200
Message-ID: <419FD473.9010705_at_med.uoc.gr>


> Greek language support should have no effect on the filenames.
> The conversion to underscores is done to avoid characters that might
> create security risks, and it looks like we were too cautious. We should
> probably alter this test in parse.c:
>
> if (((*np >= 'a' && *np <= 'z') || (*np >= '0' && *np <= '9') ||
> (*np >= 'A' && *np <= 'Z') || (*np == '-') || (*np == '.') ||
> (*np == ':') || (*np == '_'))
>
> to allow characters in the range 0xA0 to 0xFF under some conditions.
> I suspect this range of characters should be conditioned on a config
> option which defaults to not allowing them (they can be a nuisance to
> handle in some of the tools people use to maintain filesystems).
> I'm guessing that character 0xFF should not be allowed even though it
> is used as a printable character in some languages, because there might
> be some conditions under which the high order bit gets stripped off and
> we end up with 0x7F (DEL), which I suspect is dangerous to have in names.
>
> Does anyone see any problems with my guesses?

I had a second thought on the whole thing. It seems to me that a different approach is needed, because I realised that greek filenames can not be DIRECTLY referenced from a URL (ie. something like http://myserver.com/this_supposed_to_be_greek_characters.doc) (I suppose it's the same for other languages with non-latin alphabet). The underscore approach seems to work, provided that, if there is more than one attachments, they have different filename lengths (it's obvious why). So in my opinion, it would be nice if you would give us the option to rename all the attachments sent in a message to something like "attachmentXXX.###" (preserving the original extension, but using a fixed latin string (plus the number i for the i-th attachment) instead of underscores. In this way, the filename length issue is avoided, and the result is obviously much more appealing than the underscore approach.

Best regards,
Greg Received on Sun 21 Nov 2004 07:36:04 AM GMT

This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:12 AM GMT GMT