download manager overwrites files when trying to resume download from a passworded site




11 years ago
10 years ago


(Reporter: 6er6e1y, Unassigned)




Firefox Tracking Flags

(Not tracked)




11 years ago
User-Agent:       Opera/9.25 (X11; Linux i686; U; hu)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; hu-HU; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5

The download manager overwrites the downloaded file's contents with the 401 unauthorized page, instead of asking for the password again. This happens after a system crash/firefox process shutdown has happened, and firefox tries to continue the download automatically when next started.

Reproducible: Always

Steps to Reproduce:
1. start downloading some content from a http passworded site
2. kill firefox
3. restart firefox
Actual Results:  
The progress is lost, and the target file is replaced with a few bytes, if you open it with a text editor you'll see a 401 page inside. The download manager treats the file as if it has already been downloaded, so no resume or even restart is available.

Expected Results:  
First the download manager should not restart any download without notifying the user. Then, if some password is required to resume the download, the user should be asked for it. Even if resume is not possible, the downloaded file's contents should never be overwritten without notification (so the user may try some other application to finish de download, such as wget).

The above was tested on Windows XP SP2 and linux (Ubuntu 2.6.24-16), using apache 2.2.8 with digest authentication.

Comment 1

11 years ago
Confirmed: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9pre) Gecko/2008051011 Minefield/3.0pre

As noted in comment 0, this only happens after an abnormal termination.  Firefox will automatically attempt to resume the download after a normal exit, but it will, upon failure, notify the user with a "source file could not be read" error, and no data would be overwritten.  But if Firefox attempts to resume after an abnormal exit, it will not notify the user of the error, and it would overwrite the data that had already been downloaded with the server's error message.
Ever confirmed: true
Keywords: dataloss
Hardware: PC → All
Version: unspecified → Trunk


11 years ago
Product: Firefox → Toolkit

Comment 2

11 years ago
This also happens upon applying the automatically downloaded update. My scenario:

- had Firefox 3.0.1 installed and running, downloading from an HTTP source requiring basic authentication
- an update has been downloaded in background, and a tray area box notification was issued that an update can be applied
- I chose to apply the update - Firefox restarted and the update process begun
- when Firefox 3.0.2 was up, my unauthorized HTTP download has been broken, an error message (which I haven't written down) has been issued and the file was overwritten with an HTML 401 error message; the status of the download was finished
Severity: normal → critical
You need to log in before you can comment on or make changes to this bug.