mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.23k stars 2.94k forks source link

File download doesn't work with basic authentication #9010

Open norabor opened 3 years ago

norabor commented 3 years ago

Steps to reproduce

Webserver: Synology (Some apache version) Basic authentication is required (name/password) (means .htaccess is placed in web root) File download on iOS only downloads an html error page showing "401" and some error message, so I assume the saved authentication used while browsing my site is not used while downloading a file.

Expected behavior

File is downloaded as in safari

Actual behavior

File download on iOS only gives error pages showing "401" and some error message

Device & build information

┆Issue is synchronized with this Jira Task

Lekensteyn commented 2 years ago

In #9119 and #11318 users were also reporting corrupted downloads (PDF files), most likely due to the lack of cookies when trying to download a linked file.

In this report, a download failed due to lack of credentials.

I have an additional case: when trying to download a file from a server with a self-signed certificate that was explicitly accepted, a download fails, presumably because it is running into a certificate validation error.

In all these cases, it appears that downloading does not respect the current session. This affects the following flows:

Reproduced in the latest Firefox 104.2 (17705) on an iPhone with iOS 16.0. Happens both in normal browsing mode, and private browsing mode.