You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@worldgate.com> on 1997/07/26 23:08:58 UTC
NT and case sensitivity
Does the NT port of Apache properly deal with mixed case filenames on all
possible filesystems that NT (erm... or 95) uses? If the filesystem isn't
case sensitive, does Apache properly do restrictions so you can't use
http://foo/Bar/ to get by a limit on http://foo/bar/ ?
Re: NT and case sensitivity
Posted by Brian Behlendorf <br...@organic.com>.
At 07:10 PM 7/28/97 -0700, Dean Gaudet wrote:
>Apache doesn't deal with those issues. So they present a security problem
>presently. Thankfully we're in alpha :)
I think we should address them before the next alpha.
>On Mon, 28 Jul 1997, Sean McDermott wrote:
>
>> I think the only way to do this is to iterate through each directory in
>> the filepath and perform a FindFirstFile() to return a WIN32_FIND_DATA
>> structure with file information. You can use the short filename element
>> of this structure. This is by no means elegant, but probably necessary.
Brian
--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
"Why not?" - TL brian@organic.com - hyperreal.org - apache.org
Re: NT and case sensitivity
Posted by Ben Laurie <be...@algroup.co.uk>.
Dean Gaudet wrote:
>
> Apache doesn't deal with those issues. So they present a security problem
> presently. Thankfully we're in alpha :)
>
> I wonder if IIS has any security problems related to them.
>
> I want strace/truss/ktrace/whatever for NT and 95... anyone know of one?
> I'm like 3 years out of touch with the dos-relative operating system world
> ... last one I worked on regularly was OS/2 2.1.
BoundsChecker does the nearest equivalent that I know of. Costs $$$,
though. Wonder if they can be persuaded to donate some copies to the
cause?
Cheers,
Ben.
--
Ben Laurie Phone: +44 (181) 994 6435 Email:
ben@algroup.co.uk
Freelance Consultant and Fax: +44 (181) 994 6472
Technical Director URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd, Apache Group member (http://www.apache.org)
London, England. Apache-SSL author
Re: NT and case sensitivity
Posted by Dean Gaudet <dg...@arctic.org>.
Apache doesn't deal with those issues. So they present a security problem
presently. Thankfully we're in alpha :)
I wonder if IIS has any security problems related to them.
I want strace/truss/ktrace/whatever for NT and 95... anyone know of one?
I'm like 3 years out of touch with the dos-relative operating system world
... last one I worked on regularly was OS/2 2.1.
Dean
On Mon, 28 Jul 1997, Sean McDermott wrote:
> > All of which is Windows nastiness, so I guess we ought to treat the fs as
> > completely case insensitive, and always map paths onto lowercase. EMX
> > already does this for dirsections. I was thinking of an abstraction here
> > which maps a config file path onto a fs path, eg ap_map_path(), which on
> > EMX and Win32 can map to strlwr(). It could also map \ onto /.
>
> How does Apache NT deal with the fact that there is more than one name
> for certain filenames e.g. long filenames and filenames with spaces?
> e.g.:
> mkdir \longfilename
> mkdir "\long filename"
> dir \ /x
>
> This will show that you can access \longfilename as both \longfilename
> and as \longfi~1. You can access "\long filename" as both "\long
> filename" and as \longfi~2. Isn't windows wonderful? ;-)
>
> I suggest adding a conversion to counter this problem to the proposed
> ap_map_path() function. Otherwise, as for upper/lowercase, rules could
> be ignored because of this Windows irregularity. As far as I know, it
> applies to FAT as well as NTFS file systems.
>
> I think the only way to do this is to iterate through each directory in
> the filepath and perform a FindFirstFile() to return a WIN32_FIND_DATA
> structure with file information. You can use the short filename element
> of this structure. This is by no means elegant, but probably necessary.
>
> > For more bizarre fun, create two files called x and X on a unix system and
> > mount it on a NT with samba. Now Windows gets very confused: edit x and
> > edit X both edit the same file. But "type x" or "type X" display the
> > content of *both* files (like "cat x X"). Umm.
> I think the reason why this happens is that edit is a 16-bit app - or at
> least is 16 bit "enabled". edit won't even recognise a non 8.3
> filename! Since "type" is internal NT, it's win32. That's MS
> consistency once again...
>
> - Sean
> --
> Sean McDermott, WWW: http://www.itc.icl.ie/
> ICL Information Technology Centre. Tel: +353 1 2956644
>
Re: NT and case sensitivity
Posted by Sean McDermott <se...@itc.icl.ie>.
> All of which is Windows nastiness, so I guess we ought to treat the fs as
> completely case insensitive, and always map paths onto lowercase. EMX
> already does this for dirsections. I was thinking of an abstraction here
> which maps a config file path onto a fs path, eg ap_map_path(), which on
> EMX and Win32 can map to strlwr(). It could also map \ onto /.
How does Apache NT deal with the fact that there is more than one name
for certain filenames e.g. long filenames and filenames with spaces?
e.g.:
mkdir \longfilename
mkdir "\long filename"
dir \ /x
This will show that you can access \longfilename as both \longfilename
and as \longfi~1. You can access "\long filename" as both "\long
filename" and as \longfi~2. Isn't windows wonderful? ;-)
I suggest adding a conversion to counter this problem to the proposed
ap_map_path() function. Otherwise, as for upper/lowercase, rules could
be ignored because of this Windows irregularity. As far as I know, it
applies to FAT as well as NTFS file systems.
I think the only way to do this is to iterate through each directory in
the filepath and perform a FindFirstFile() to return a WIN32_FIND_DATA
structure with file information. You can use the short filename element
of this structure. This is by no means elegant, but probably necessary.
> For more bizarre fun, create two files called x and X on a unix system and
> mount it on a NT with samba. Now Windows gets very confused: edit x and
> edit X both edit the same file. But "type x" or "type X" display the
> content of *both* files (like "cat x X"). Umm.
I think the reason why this happens is that edit is a 16-bit app - or at
least is 16 bit "enabled". edit won't even recognise a non 8.3
filename! Since "type" is internal NT, it's win32. That's MS
consistency once again...
- Sean
--
Sean McDermott, WWW: http://www.itc.icl.ie/
ICL Information Technology Centre. Tel: +353 1 2956644
Re: NT and case sensitivity
Posted by Paul Sutton <pa...@ukweb.com>.
On Sun, 27 Jul 1997, Ben Laurie wrote:
> Marc Slemko wrote:
> > Does the NT port of Apache properly deal with mixed case filenames on all
> > possible filesystems that NT (erm... or 95) uses? If the filesystem isn't
> > case sensitive, does Apache properly do restrictions so you can't use
> > http://foo/Bar/ to get by a limit on http://foo/bar/ ?
>
> Almost certainly not!
Um, probably not, but it depends whether you think the windows file system
(NTFS) is case sensitive or not. Sometimes it is, sometimes it isn't. It
*does* know about case, but tends to ignore it some times. I think it is
case-sensitive when creating files, but not when accessing them.
For more bizarre fun, create two files called x and X on a unix system and
mount it on a NT with samba. Now Windows gets very confused: edit x and
edit X both edit the same file. But "type x" or "type X" display the
content of *both* files (like "cat x X"). Umm.
All of which is Windows nastiness, so I guess we ought to treat the fs as
completely case insensitive, and always map paths onto lowercase. EMX
already does this for dirsections. I was thinking of an abstraction here
which maps a config file path onto a fs path, eg ap_map_path(), which on
EMX and Win32 can map to strlwr(). It could also map \ onto /.
//pcs
Re: NT and case sensitivity
Posted by Ben Laurie <be...@algroup.co.uk>.
Marc Slemko wrote:
>
> Does the NT port of Apache properly deal with mixed case filenames on all
> possible filesystems that NT (erm... or 95) uses? If the filesystem isn't
> case sensitive, does Apache properly do restrictions so you can't use
> http://foo/Bar/ to get by a limit on http://foo/bar/ ?
Almost certainly not!
Cheers,
Ben.
--
Ben Laurie Phone: +44 (181) 994 6435 Email:
ben@algroup.co.uk
Freelance Consultant and Fax: +44 (181) 994 6472
Technical Director URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd, Apache Group member (http://www.apache.org)
London, England. Apache-SSL author
Re: NT and case sensitivity
Posted by Ben Laurie <be...@algroup.co.uk>.
Dean Gaudet wrote:
>
> I asked about this too a few weeks back. You'll note some strlwr()s in
> the code, similar to how OS/2 handles things. I asked if we should
> provide api functions for comparing two paths, and path elements. And if
> we should provide an is_slash() function... yadda.
Hmmm ... musta missed that. I think that is a good idea.
Cheers,
Ben.
--
Ben Laurie Phone: +44 (181) 994 6435 Email:
ben@algroup.co.uk
Freelance Consultant and Fax: +44 (181) 994 6472
Technical Director URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd, Apache Group member (http://www.apache.org)
London, England. Apache-SSL author
Re: NT and case sensitivity
Posted by Dean Gaudet <dg...@arctic.org>.
I asked about this too a few weeks back. You'll note some strlwr()s in
the code, similar to how OS/2 handles things. I asked if we should
provide api functions for comparing two paths, and path elements. And if
we should provide an is_slash() function... yadda.
The answer is probably yes.
Dean
On Sat, 26 Jul 1997, Marc Slemko wrote:
> Does the NT port of Apache properly deal with mixed case filenames on all
> possible filesystems that NT (erm... or 95) uses? If the filesystem isn't
> case sensitive, does Apache properly do restrictions so you can't use
> http://foo/Bar/ to get by a limit on http://foo/bar/ ?
>
>