Open Bug 1993095 Opened 4 months ago Updated 2 months ago

Don't expose "application/x-moz-file" on drag and drop

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, enhancement)

enhancement

Tracking

()

REOPENED

People

(Reporter: jrmuizel, Assigned: jrmuizel, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: webcompat:platform-bug)

User Story

user-impact-score:300

Attachments

(1 file)

This type is non-standard and is breaking drag and drop of files into fiverr.com.

If we still want to keep this around it would be valuable to disable it per-origin.

Blocks: 1984283

This was added in bug 1290688

See Also: → 1290688

Nika, can we stop exposing "application/x-moz-file" to web content?

Flags: needinfo?(nika)
User Story: (updated)

It looks like at least at some point in the past I thought we needed to keep "application/x-moz-file" around for backwards compatibility (https://searchfox.org/firefox-main/rev/1c6a8b56e6f5f5393ea5ea745ab63ecb67613c93/dom/events/DataTransfer.cpp#480-482, https://searchfox.org/firefox-main/rev/1c6a8b56e6f5f5393ea5ea745ab63ecb67613c93/dom/events/DataTransferItemList.cpp#453-455, https://bug1342057.bmoattachments.org/attachment.cgi?id=8841081).

Looking at that bug (bug 1342057), it appears like it was a web-compat issue and was being uplifted, so I may have been doing this out of caution at the time, and perhaps we could safely hide kFileMime now, hiding GetInternalType more consistently.

Unfortunately, D&D is very poorly tested, so we'd need to do a good chunk of manual testing to make sure that things still work, especially internal consumers of the D&D APIs.

Flags: needinfo?(nika)

Just came across bug 1290688 comment 13, which appears to explicitly note that we have internal code which depends on "application/x-moz-file" being there.

Yeah, unfortunately it doesn't mention which code :)

The existance of kFileMime ("application/x-moz-file") in types
is breaking drag and drop on fiverr.com. We don't seem to need it.

Assignee: nobody → jmuizelaar
Status: NEW → ASSIGNED
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a9582148b310 https://hg.mozilla.org/integration/autoland/rev/349861fa92a0 Revert "Bug 1993095. Don't include "application/x-moz-file" in types. r=tschuster" for causing bc failures @ browser_clipboard_paste_file_content_analysis.js
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 146 Branch
Regressions: 1996760
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0c22beffb811 https://hg.mozilla.org/integration/autoland/rev/13ba9793db2e Revert "Bug 1993095. Don't include "application/x-moz-file" in types. r=tschuster" for causing mochitests failures in test_paste_image.html.

Reverted this because it was causing mochitests failures in test_paste_image.html.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 146 Branch → ---
Status: REOPENED → RESOLVED
Closed: 3 months ago2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
Regressions: 2001332
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 147 Branch → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: