[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] [bug #51284] Wget incorrectly parses FTP listing if filenames
From: |
anonymous |
Subject: |
[Bug-wget] [bug #51284] Wget incorrectly parses FTP listing if filenames have leading spaces |
Date: |
Wed, 21 Jun 2017 05:12:57 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0 |
URL:
<http://savannah.gnu.org/bugs/?51284>
Summary: Wget incorrectly parses FTP listing if filenames
have leading spaces
Project: GNU Wget
Submitted by: None
Submitted on: Wed 21 Jun 2017 09:12:56 AM UTC
Category: Program Logic
Severity: 3 - Normal
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Name: Roger Lainson
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 1.17.1
Operating System: GNU/Linux
Reproducibility: Every Time
Fixed Release: None
Planned Release: None
Regression: None
Work Required: None
Patch Included: No
_______________________________________________________
Details:
Wget incorrectly parses the FTP listing if filenames have leading spaces.
Given a remote file with a name like ' X' (admittedly unusual but legal in
Linux), Wget incorrectly determines the filename as 'X' from the LIST command,
and hence a RETR for the file fails with '550 Failed to open file' or
similar.
See attached output from Wget, and corresponding .listing file.
Worth noting that WinSCP has the same problem, as may other FTP clients. In
fact filenames like ' X' are not easy to create (without shell access to the
FTP server), so this is probably not a high priority problem.
A suggestion: rather than assume there are no leading spaces in the filename
(the current parsing method), maybe we could look for the directory '..' in
the listing, and use that to note the character position which is the start of
the filename.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 21 Jun 2017 09:12:56 AM UTC Name: Wget example - filename with
leading spaces.txt Size: 4kB By: None
(.listing has been renamed to ..listing to satisfy Windows)
<http://savannah.gnu.org/bugs/download.php?file_id=40963>
-------------------------------------------------------
Date: Wed 21 Jun 2017 09:12:56 AM UTC Name: ..listing Size: 186B By: None
(.listing has been renamed to ..listing to satisfy Windows)
<http://savannah.gnu.org/bugs/download.php?file_id=40964>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51284>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-wget] [bug #51284] Wget incorrectly parses FTP listing if filenames have leading spaces,
anonymous <=