Saving an image with a data: URL causes gvfs to loop and kill the disk
Categories
(Toolkit :: Downloads API, defect, P5)
Tracking
()
People
(Reporter: BenB, Unassigned)
References
Details
(Keywords: hang, regression)
Updated•11 years ago
|
Reporter | ||
Comment 1•11 years ago
|
||
Comment 2•11 years ago
|
||
Reporter | ||
Comment 3•11 years ago
|
||
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
Comment 6•2 years ago
|
||
In the process of migrating remaining bugs to the new severity system, the severity for this bug cannot be automatically determined. Please retriage this bug using the new severity system.
Comment 7•2 years ago
|
||
The severity field is not set for this bug.
:mak, could you have a look please?
For more information, please visit BugBot documentation.
Comment 8•2 years ago
|
||
This is apparently still relevant https://searchfox.org/mozilla-central/rev/dc8348b3730c0d29dafd01c653d9151eaa9bc30f/toolkit/components/downloads/DownloadPlatform.cpp#173 though it was inactive for 9 years, that looks like a low priority.
I've performed a review of similar mechanisms on other platforms, and they all save both the "referring page" and the "data uri" in order to avoid problems with data: and blob: URIs.
Windows stores:
WindowsQuarantineInfo:
ZoneID int // 3 = Internet
DataURL string // HostUrl
ReferrerURL string // ReferrerUrl
Apple stores:
AppleQuarantineInfo:
QuarantineType AppleQuarantineType // (enum as string) kLSQuarantineTypeKey
DataURL string // kLSQuarantineDataURLKey
ReferrerURL string // kLSQuarantineOriginURLKey
AgentBundleIdentifier string //kLSQuarantineAgentBundleIdentifierKey
AgentName string // kLSQuarantineAgentNameKey
TimeStamp Time // (TODO look up timestamp format) kLSQuarantineTimeStampKey
plus an OS-privileged flag indicating whether the user has cleared the warning.
Chrome on Linux used to store:
kSourceURLXattrName[] = "user.xdg.origin.url";
kReferrerURLXattrName[] = "user.xdg.referrer.url";
but this was deleted because no security tools were using it: https://chromium-review.googlesource.com/c/chromium/src/+/1407441
And with no checking of excessive data URI length.
Capping excessive data: URIs to just "data:" and storing the page referrer instead would work, but there's no established metadata key to do that with.
I would like to advocate that both the download URL and referrer URL always both be stored if they are stored at all, due to the prevalence of browser extensions needing to use either data: or blob: in order to download anything useful.
Description
•