Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileDownload: cannot download file with http connection on firefox 125+ #11766

Closed
wbss1 opened this issue Apr 17, 2024 · 16 comments
Closed

FileDownload: cannot download file with http connection on firefox 125+ #11766

wbss1 opened this issue Apr 17, 2024 · 16 comments
Labels
browser-specific Is this a browser specific issue third-party Issue is tracked in 3rd party library workaround A workaround has been provided

Comments

@wbss1
Copy link

wbss1 commented Apr 17, 2024

Describe the bug

Hello, it's no longer possible to download files using an http connection with the new download protection on firefox (version 125+). The files are downloaded, but they are not complete. This problems affect all version of primefaces.

Here it's the log error
error download file.txt

Reproducer

Firefox Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1894667

Expected behavior

Correct download of file

PrimeFaces edition

None

PrimeFaces version

all

Theme

No response

JSF implementation

Mojarra

JSF version

2.3

Java version

8

Browser(s)

Firefox 125.0.1

@wbss1 wbss1 added ‼️ needs-triage Issue needs triaging 🐞 defect Bug...Something isn't working labels Apr 17, 2024
@jepsar
Copy link
Member

jepsar commented Apr 17, 2024

Are you using Ajax or non-Ajax downloading? Please include a reproducer.

@jepsar jepsar added Status: Needs Reproducer Needs a reproducer showing the issue and removed ‼️ needs-triage Issue needs triaging labels Apr 17, 2024
Copy link

Please provide an executable example using the PrimeFaces Test project. This issue will be closed if no activities in 20 days.

@wbss1
Copy link
Author

wbss1 commented Apr 17, 2024

Here it's the reproducer.
For the test you need to not use localhost, you must use the ip.
With ajax works, with ajax false not.
pf-test-download-firefox.zip

@jepsar jepsar removed the Status: Needs Reproducer Needs a reproducer showing the issue label Apr 17, 2024
@jepsar
Copy link
Member

jepsar commented Apr 17, 2024

It just allows me to download it after pressing a button.

Screenshot 2024-04-17 at 11 58 46 Screenshot 2024-04-17 at 11 58 59

@jepsar jepsar added third-party Issue is tracked in 3rd party library and removed third-party Issue is tracked in 3rd party library labels Apr 17, 2024
@jepsar
Copy link
Member

jepsar commented Apr 17, 2024

Hmm.. it is broken after download though. I guess it's a FF issue.

@jepsar jepsar added the third-party Issue is tracked in 3rd party library label Apr 17, 2024
@wbss1
Copy link
Author

wbss1 commented Apr 17, 2024

Yes it is almost always in ssl, but if the application is only used on the local network it is not. Example: private server for internal use.
If you click on allow the download and open the file, you will see that it is damaged.

Chrome applies the same policy, but the file is downloaded successfully

@melloware
Copy link
Member

@wbss1 i would start scanning the Mozilla bug list to see if this has been reported...

@melloware melloware added the browser-specific Is this a browser specific issue label Apr 17, 2024
@melloware
Copy link
Member

Found this bug from 11 years ago it was the same issue with Virus Scanner in their downloads corrupting Firefox files: https://support.mozilla.org/en-US/questions/893054

@melloware
Copy link
Member

OK type about:config in your browser bar and disabled these settings and downloads work. Its definitely a Firefox bug.

image

@wbss1
Copy link
Author

wbss1 commented Apr 17, 2024

Seems like that disable dom.block_download_insecure it's enough.
I will try to report it with bugzilla

@melloware
Copy link
Member

Yep it looks like it!

@melloware melloware added workaround A workaround has been provided and removed 🐞 defect Bug...Something isn't working labels Apr 17, 2024
@wbss1
Copy link
Author

wbss1 commented Apr 17, 2024

I reported it on bugzilla https://bugzilla.mozilla.org/show_bug.cgi?id=1892115

EDIT: Bug tracked here: https://bugzilla.mozilla.org/show_bug.cgi?id=1894667

@melloware
Copy link
Member

Looks like quite a few bugs around that insecure SSL feature: https://bugzilla.mozilla.org/show_bug.cgi?id=1892069 Doesn't look like they tested it enough 😄

@melloware
Copy link
Member

Firefox 126.0 is out can someone test it to see if its fixed?

@wbss1
Copy link
Author

wbss1 commented May 14, 2024

In Firefox 125.0.2 they disable the HTTP download protection mechanism and they are working for fix the bug (https:///bugzilla.mozilla.org/show_bug.cgi?id=1894667)

I hope they will follow this comment and implement a solution like Google Chrome "Would it be possible to keep the response/content in a temporary location? Then if the user accepts the download the answer can be saved, otherwise it is deleted.

I’m not familiar with the implementation, but Firefox already writes a temporary . part file while downloading, so maybe this could be used, and is renamed only when the user accepts the download, and deleted otherwise."
but seems that they want to block the request and re-submit it again later when the user accept the download. Obviously the POST requests are not idempotent, so they are working on it.

@melloware
Copy link
Member

OK @wbss1 i will close for now as nothing PF can do for this issue.

@melloware melloware closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser-specific Is this a browser specific issue third-party Issue is tracked in 3rd party library workaround A workaround has been provided
Projects
None yet
Development

No branches or pull requests

3 participants