The "Save image" and "Download link" context menu items do not have a download confirmation prompt like other browsers, making it possible to leak private tabs by accident
Categories
(Fenix :: Downloads, enhancement)
Tracking
(firefox115 affected)
Tracking | Status | |
---|---|---|
firefox115 | --- | affected |
People
(Reporter: ke5trel, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: parity-chrome, privacy)
Attachments
(1 file)
213.65 KB,
image/png
|
Details |
STR:
- Open a private tab in Android Nightly 114.
- Long-press an image to show the context menu and choose "Save image" or "Download link".
The file is immediately saved to disk without any confirmation, compromising the private tab. It's easy to accidentally open the context menu or tap the wrong item while doing regular actions like opening links in a new tab. The "Download link" item appears in the middle of the screen which is likely to be under finger.
A download notification appears but small files download faster than it takes to cancel them, the notification itself may go unnoticed and deleting the files afterwards does not prevent them from being recovered.
Chromium-based browsers show a download confirmation when saving images and hide the "Download link" in private tabs. Many of them show the confirmation in non-private tabs as well (eg Edge, Brave, Opera, Vivaldi, Kiwi and LineageOS).
A work around is to install a download manager and enable the setting for it so that Android asks which app to use, giving an opportunity to cancel the download before it starts. This work around is not available in Firefox Focus and Tor Browser.
Updated•1 year ago
|
Comment 1•1 year ago
|
||
A quick fix.
diff --git a/android-components/components/feature/contextmenu/src/main/java/mozilla/components/feature/contextmenu/ContextMenuCandidate.kt b/android-components/components/feature/contextmenu/src/main/java/mozilla/components/feature/contextmenu/ContextMenuCandidate.kt
index 28ad4b510b..b604787c51 100644
--- a/android-components/components/feature/contextmenu/src/main/java/mozilla/components/feature/contextmenu/ContextMenuCandidate.kt
+++ b/android-components/components/feature/contextmenu/src/main/java/mozilla/components/feature/contextmenu/ContextMenuCandidate.kt
@@ -359,7 +359,7 @@ data class ContextMenuCandidate(
action = { tab, hitResult ->
contextMenuUseCases.injectDownload(
tab.id,
- DownloadState(hitResult.src, skipConfirmation = true, private = tab.content.private),
+ DownloadState(hitResult.src, skipConfirmation = !tab.content.private, private = tab.content.private),
)
},
)
@@ -418,7 +418,7 @@ data class ContextMenuCandidate(
action = { tab, hitResult ->
contextMenuUseCases.injectDownload(
tab.id,
- DownloadState(hitResult.src, skipConfirmation = true, private = tab.content.private),
+ DownloadState(hitResult.src, skipConfirmation = !tab.content.private, private = tab.content.private),
)
},
)
@@ -446,7 +446,7 @@ data class ContextMenuCandidate(
action = { tab, hitResult ->
contextMenuUseCases.injectDownload(
tab.id,
- DownloadState(hitResult.src, skipConfirmation = true, private = tab.content.private),
+ DownloadState(hitResult.src, skipConfirmation = !tab.content.private, private = tab.content.private),
)
},
)
Description
•