bugGNU Wget - Bugs: bug #45992, wget not properly following...

 
 

bug #45992: wget not properly following redirects

Submitter:  Johnny Chin <jchin>
Submitted:  Thu 17 Sep 2015 11:29:22 PM UTC
   
 
Category:  Program Logic Severity:  3 - Normal
Priority:  5 - Normal Status:  Invalid
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  1.16.3 Operating System:  Microsoft Windows
Reproducibility:  Every Time Fixed Release:  None
Planned Release:  None Regression:  None
Work Required:  None Patch Included:  No
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 17 Sep 2015 11:43:27 PM UTC, comment #2: 

I found my answer online.
Add this line to my wgetrc:
trust_server_names = on

Johnny Chin <jchin>
Thu 17 Sep 2015 11:34:30 PM UTC, comment #1: 

I was just made aware of the command-line option
 --trust-server-names
which will save the download with the proper file name.
(avoid the vulnerability CVE-2010-2252)

My question now is, how can I make that the default behavior?
I have existing processes that use wget which rely on this legacy behavior.

Thank you.

Johnny Chin <jchin>
Thu 17 Sep 2015 11:29:22 PM UTC, original submission:  

When we are using wget v1.11.4 obtained from here:
http://gnuwin32.sourceforge.net/packages/wget.htm
it follows HTTP redirects correctly.

For example:
wget http://downloads.malwarebytes.org/file/mbam/
should result in getting the most current .exe file
instead version 1.16.x (or anything v1.13 or newer) saves an index.html

My point is that it should NOT be downloading and saving an index.html, it should have followed the redirect and downloaded
http://data-cdn.mbamupdates.com/web/mbam-setup-2.1.8.1057.exe
saving mbam-setup-2.1.8.1057.exe

Please fix.

NOTE: wget v1.11.4 was working perfectly fine except it couldn't handle the encrypted connections of some servers, like:
wget https://www.glasswire.com/download/GlassWireSetup.exe


Johnny Chin <jchin>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rockdaboot (Updated the item)
  • -email is unavailable- added by jchin (Submitted the item)
  • -email is unavailable- added by jchin
  •  

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-09-18 rockdaboot StatusNone Invalid
        Open/ClosedOpen Closed
    2015-09-17 jchin Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code