Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 70656

Summary: mirror-2.9: FTP-Response Whitespace Parse Problem
Product: Gentoo Linux Reporter: Ervin Peters <ervin.peters>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: normal CC: mcummings
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 138404    

Description Ervin Peters 2004-11-10 05:00:38 UTC
Since it is not solved for quite a while I'll try my first Bug-Report, my fist diff and I would appreciate if it will find its way into Gentoo.

The Problem:
Most ftpd answers "227 Entering Passive Mode" followed by one Space and some data.
Some ftpd answers "227 Entering Passive Mode" followed by two Spaces and some data, e.g. Websites hosted by www.strato.de.

mirror 2.9 expects exactly one space between that answer and the data, so connections to some ftpd fails because the Information behind those space is not recognized.

The solution is small, in /usr/lib/mirror-2.9/ftp.pl line 489 the space in the testing and parsing regex has to be changed from ' ' to something like '\s+' (one or more whitespace).

running diff /modified/ftp.pl /path/to/original/ftp.pl shows this:
489c489
<               if( $response =~ m/^227 Entering Passive Mode\s+\((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/ ){
---
>               if( $response =~ m/^227 Entering Passive Mode \((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/ ){

That might conflict with FTP-RFCs (I do not know) but it works for me.

Ervin

Reproducible: Always
Steps to Reproduce:
1. Try to mirror via ftp a website hosted by strato
2.
3.

Actual Results:  
mirror hangs at

150 Opening ASCII mode data connection.
Comment 1 Ervin Peters 2004-11-10 05:08:59 UTC
the problematic ftpd from strato-hosting announces himself as:

214-
  ftpd.bin - Round-robin File Transfer Server, version 3.4.0r8
  (C)1997,1998,1999 by Marc Huber <marc@sixpack.de>

ervin
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-09-21 16:00:15 UTC
Re-assign, assignee is retired.
Comment 3 Christian Heim (RETIRED) gentoo-dev 2006-08-18 10:19:16 UTC
The net-misc/mirror package has been removed.