Bug 227498 - overwrites downloaded file with symlink
overwrites downloaded file with symlink
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: wget (Show other bugs)
19
All Linux
low Severity medium
: ---
: ---
Assigned To: Tomas Hozza
: Reopened, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-06 09:00 EST by Michael Schwendt
Modified: 2013-08-21 08:39 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-21 08:39:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch for wget-1.14 solving this issue (13.89 KB, patch)
2012-10-15 09:56 EDT, Tomas Hozza
thozza: review?
Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Savannah 23107 None None None 2012-10-16 06:33:28 EDT

  None (edit)
Description Michael Schwendt 2007-02-06 09:00:29 EST
$ wget ftp://invisible-island.net/byacc/byacc.tar.gz
--14:59:48--  ftp://invisible-island.net/byacc/byacc.tar.gz
           => `.listing'
Resolving invisible-island.net... 216.194.228.25
Connecting to invisible-island.net|216.194.228.25|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /byacc ... done.
==> PASV ... done.    ==> LIST ... done.

    [ <=>                                    ] 433         2.68K/s   in 0.2s   

14:59:51 (2.68 KB/s) - `.listing' saved [433]

Removed `.listing'.
Creating symlink byacc.tar.gz -> byacc-20050813.tgz


But byacc-20050813.tgz doesn't exist, because wget didn't rename the
downloaded byacc.tar.gz before overwriting it with the symlink which
now points to a non-existant file.
Comment 1 Karsten Hopp 2007-02-12 08:07:12 EST
caused by the to11 patch, I'll remove that as it causes to many problems.
Comment 2 Bill Nottingham 2007-03-02 12:35:02 EST
Moving to 'devel' as discussed on
https://www.redhat.com/archives/fedora-devel-list/2007-March/msg00095.html.
Comment 3 Michael Schwendt 2007-12-21 19:06:04 EST
Reproducible.

$ rpm -q wget
wget-1.10.2-16.fc8
Comment 4 Karsten Hopp 2008-04-03 10:55:04 EDT
seems to be fixed in wget-1.11.1, please try the latest wget package  from
rawhide and reopen if you still can reproduce it.
Comment 5 Michael Schwendt 2008-04-14 16:03:52 EDT
New test-case:

wget -N ftp://invisible-island.net/byacc/byacc.tar.gz
Comment 6 Karsten Hopp 2008-05-07 06:43:09 EDT
reported upstream and has been confirmed as a bug in 1.10 and 1.11
Comment 7 Micah Cowan 2008-05-13 16:05:56 EDT
Which upstream bug corresponds to this?
Comment 8 Micah Cowan 2008-05-13 16:08:57 EDT
Never mind. Here's the thread where Karsten reported the problem:
http://article.gmane.org/gmane.comp.web.wget.general/8029

And here's the bug report on Savannah:
https://savannah.gnu.org/bugs/index.php?23107

It's not entirely clear to me that the descriptions for these two reports
(Redhat's and Savannah's) are consistent. This one seems to be about overwriting
files with a symlink, whereas the Savannah report focuses on retrieving the real
file instead of the symlink.
Comment 9 Bug Zapper 2008-05-13 22:35:31 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 10 Bug Zapper 2009-06-09 18:26:27 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 11 Michael Schwendt 2009-06-10 01:49:06 EDT
$ rpm -q wget
wget-1.11.4-1.fc10.i386
Comment 12 Bug Zapper 2009-11-18 03:10:37 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 13 Bug Zapper 2009-12-18 00:54:39 EST
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 14 Michael Schwendt 2012-07-18 05:06:59 EDT
$ rpm -q wget
wget-1.13.4-2.fc17.x86_64
Comment 15 Tomas Hozza 2012-10-15 09:56:39 EDT
Created attachment 627449 [details]
Patch for wget-1.14 solving this issue

Hi.

I wrote a patch for this issue for wget-1.14 source and would like to ask anybody to review it. I posted this patch also on upstream page (https://savannah.gnu.org/bugs/index.php?23107).

Thanks!
Comment 16 Tomas Hozza 2012-10-16 04:08:24 EDT
There is one issue, that the patch doesn't handle correctly. Particularly creation of the new URL from the path to which the symlink points is not handled always OK.

Example:
Original URL: ftp://192.168.100.12/333/link
SymLink: link -> ../001/002/byacc.tar.gz
New URL will be: ftp://192.168.100.12/../001/002/byacc.tar.gz

which will pass OK (but is not correct), but there are some cases, when it doesn't have to work as it should.

I'm not sure how to do this correctly, therefore I'm posting it here for discussion.
Comment 17 Fedora End Of Life 2013-07-04 02:44:16 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 18 Fedora End Of Life 2013-08-01 14:21:38 EDT
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 19 Tomas Hozza 2013-08-21 08:39:02 EDT
Since this bug has been reported upstream and there is low probability that
I'll come up with suitable solution I'm closing this bug as UPSTREAM.

Note You need to log in before you can comment on or make changes to this bug.