www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leos Bitto <bi...@kolej.mff.cuni.cz>
Subject mod_proxy/279: Spaces in file and directory names fool ftp proxy in Apache
Date Fri, 28 Mar 1997 00:10:01 GMT

>Number:         279
>Category:       mod_proxy
>Synopsis:       Spaces in file and directory names fool ftp proxy in Apache
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache (Apache HTTP Project)
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Thu Mar 27 16:10:00 1997
>Originator:     bitto@kolej.mff.cuni.cz
>Organization:
apache
>Release:        1.2b7
>Environment:
Linux 2.0.27 (RedHat 4.1)
GCC 2.7.2.1
But this is totally irrelevant to this bug.
>Description:
When there's a space (%20) in name of the file or directory on ftp server,
Apache FTP proxy generates something as:

<HTML><HEAD><TITLE>ftp://localhost/pub/test</TITLE></HEAD><BODY><H1>Directory
ftp://localhost/pub/test</H1><HR><PRE>total 9
drwxr-sr-x   4 root     ftpadm       1024 Mar 27 23:42 <A HREF="ftp://localhost/pub/test">.</A>
drwxrwsr-x  18 root     ftpadm       1024 Mar 27 23:21 <A HREF="ftp://localhost/pub">..</A>
drwxr-sr-x   2 root     ftpadm       1024 Mar 27 23:21 a <A HREF="ftp://localhost/pub/test/b">b</A>
drwxr-sr-x   2 root     ftpadm       1024 Mar 27 23:21 c d <A HREF="ftp://localhost/pub/test/e">e</A>
-rw-r--r--   1 root     ftpadm       4536 Mar 27 22:12 name with <A HREF="ftp://localhost/pub/test/spaces">spaces</A>
</PRE><HR><I><A HREF="http://www.apache.org">Apache/1.2b7</A></I></BODY></HTML>t
correct.

which, as you can see, is incorrect.
>How-To-Repeat:
Create files and/or directories with spaces in names on any ftp archive
and connect to this ftp archive using Apache 1.2b7 ftp proxy (I think that 
other versions have this bug too).
>Fix:
There should be more clever algorithm in proxy_ftp.c. Now there is 
filename=strrchr(buf, ' '), which is too simple. Maybe you could steal
some ideas from Squid - it handles spaces in names correctly. :-)
%0
>Audit-Trail:
>Unformatted:



Mime
View raw message