[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-bugdb
Subject:    mod_proxy/5928: FTP Proxy Misdisplays file name/links when .. entry size causes line to reformat
From:       Ted Keller <keller () bfg ! com>
Date:       2000-03-26 2:31:01
[Download RAW message or body]


> Number:         5928
> Category:       mod_proxy
> Synopsis:       FTP Proxy Misdisplays file name/links when .. entry size causes \
>                 line to reformat
> Confidential:   no
> Severity:       serious
> Priority:       medium
> Responsible:    apache
> State:          open
> Class:          sw-bug
> Submitter-Id:   apache
> Arrival-Date:   Sat Mar 25 18:40:00 PST 2000
> Closed-Date:
> Last-Modified:
> Originator:     keller@bfg.com
> Release:        apache_1.3.9
> Organization:
apache
> Environment:
ns2.bfg.com% uname -a
SunOS ns2.bfg.com 5.7 Generic_106541-05 sun4u sparc SUNW,Ultra-4
ns2.bfg.com% 

ns2.bfg.com% gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/specs
gcc version 2.95.2 19991024 (release)
ns2.bfg.com% 
> Description:
Note - this is related to bug reports 3658 and 4087 - space processing in ftp
file names.

If you access a site with a file directory which looks like Directory of \
ftp://205.227.44.220/apps/outgoing/12788631.600/  \
_________________________________________________________________

total 454
drwxr-xr-x   2 10              96 Mar 20 15:49 .
drwxrwxrwx  7591 21          197632 Mar 25 15:29 ..
-rw-r--r--   1 0            26480 Mar 20 15:49 451786.1070t.Z

default apache displays the directory entry as:

Directory of ftp://205.227.44.220/apps/outgoing/12788631.600/            
     _________________________________________________________________

total 454
drwxr-xr-x   2 10              96 Mar 20 15:49 .
drwxrwxrwx  7591 21          197632 Mar 25 15:29 ..
-rw-r--r--   1 0            26480 Mar 20 15:49 4 1786.1070t.Z
     _________________________________________________________________

Note the corruption in the file name.

THis problems is caused by the file name space processing located in send_dir
around line 368.  The code as written incorrectly identifies the starting location of \
the file name area because the previous line's directory size forced a reformat \
(shifting) of the file name (..).

Temporary fixe - simply remove the space processing code (which break that part).
> How-To-Repeat:

> Fix:
Improved parsing of the line is required to properly identify the start of the file.  \
This requires the code to be aware of all ftp servers NLST command processing.  If \
one can assume that they are all of the form

mode (directory, link, file), permissions, # links, group, size, file name
this could be parsed off directly - front to back - and then properly identify the \
file name.
> Release-Note:
> Audit-Trail:
> Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]
 
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic