Closed Bug 2086505 Opened 1 month ago Closed 25 days ago

[Custom Format] Add same-origin restriction first

Categories

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

task

Tracking

()

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- fixed

People

(Reporter: hsinyi, Assigned: edenchuang)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

IIUC we currently do not block cross-origin custom format read.

Hi Eden,
Is my understanding right here that we need this one blocking bug 2053725? Thank you.

Flags: needinfo?(echuang)
Blocks: 2053725
Blocks: 2086510

(In reply to Hsin-Yi Tsai (she/her) | away [:hsinyi] from comment #0)

IIUC we currently do not block cross-origin custom format read.

We block cross-origin custom format read when the clipboard data is from other Apps(We treat other app's data is cross-origin data).

We do not block cross-origin custom format read when the clipboard data is from other origin in the Firefox. However, cross-origin custom-format paste follows other cross-origin data paste, which means a pop-up context menu with a "Paste" button is shown when pasting.

I am unsure whether we really need more limitations for cross-origin custom-format data than for other cross-origin data.

Flags: needinfo?(echuang)
Assignee: nobody → echuang
Attachment #9670636 - Attachment description: WIP: Bug 2086505 - Only expose web custom formats to readers that are same-origin with the clipboard data unless clipboard.readCrossOriginCustomFormats.enabled is set. → Bug 2086505 - Only expose web custom formats to readers that are same-origin with the clipboard data unless clipboard.readCrossOriginCustomFormats.enabled is set. r=edgar
Status: NEW → ASSIGNED
Blocks: 2087427

(In reply to Eden Chuang[:edenchuang] from comment #2)

(In reply to Hsin-Yi Tsai (she/her) | away [:hsinyi] from comment #0)

IIUC we currently do not block cross-origin custom format read.

We block cross-origin custom format read when the clipboard data is from other Apps(We treat other app's data is cross-origin data).

We do not block cross-origin custom format read when the clipboard data is from other origin in the Firefox. However, cross-origin custom-format paste follows other cross-origin data paste, which means a pop-up context menu with a "Paste" button is shown when pasting.

I am unsure whether we really need more limitations for cross-origin custom-format data than for other cross-origin data.

Yes, we treat data from other applications as cross-origin data.
So, to me, it makes more sense to handle all "cross-origin" data consistently. :)

Attachment #9670636 - Attachment description: Bug 2086505 - Only expose web custom formats to readers that are same-origin with the clipboard data unless clipboard.readCrossOriginCustomFormats.enabled is set. r=edgar → WIP: Bug 2086505 - Only expose web custom formats to readers that are same-origin with the clipboard data unless clipboard.readCrossOriginCustomFormats.enabled is set.
Attachment #9670636 - Attachment description: WIP: Bug 2086505 - Only expose web custom formats to readers that are same-origin with the clipboard data unless clipboard.readCrossOriginCustomFormats.enabled is set. → Bug 2086505 - Only expose web custom formats to readers that are same-origin with the clipboard data unless clipboard.readCrossOriginCustomFormats.enabled is set.
Pushed by echuang@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c8f9b4f3f384 https://hg.mozilla.org/integration/autoland/rev/94572109a1da Only expose web custom formats to readers that are same-origin with the clipboard data unless clipboard.readCrossOriginCustomFormats.enabled is set. r=edgar
Status: ASSIGNED → RESOLVED
Closed: 25 days ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
QA Whiteboard: [qa-triage-done-c162/b161]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: