Enable showing "Paste" button for `navigator.clipboard.readText()` when called from Addons which don't have `clipboardRead` permssion
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, task)
Tracking
()
People
(Reporter: mbrodesser-Igalia, Assigned: edgar, NeedInfo)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-needed)
Attachments
(2 files)
Reporter | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
After bug 1744524, we use different security model for clipboard.readText()
in web content which will show a prompt to user. Currently we keeps security model for Addons unchanged, i.e. Addon is allowed to read clipboard only if it has clipboardRead
permission, otherwise, throw an error.
I am not sure if we need to apply the user prompt to Addon, there are following possible options off the top of my head.
1). Keeps security model for Addons unchanged: if Addon has clipboardRead
permission, allow to read (without showing prompt), otherwise, throw an error.
2). If Addon has clipboardRead
permission, show the prompt to user, otherwise reject promise.
3). If Addon has clipboardRead
permission, allow read (without showing prompt), otherwise, show a prompt to user.
or 4). others
It will be nice to have some input from Addons folks, :zombie, would you mind shedding some light here? Or do you know who might have opinion on this? Thanks!
Hi Edgar! Personally, I would prefer 1 or 3, as my extension depends on that behavior to do some very cool things.
Comment 3•2 years ago
|
||
I think the option 3 would be our preference, generally whatever is available to normal web pages is by default exposed to extensions (unless we have a specific reason not to).
We would be very much against option 2, as it would be both a backwards-breaking change, and cross-browser compatibility issue.
I'll follow up with the team and let you know if we have any more opinions here.
Assignee | ||
Comment 4•2 years ago
|
||
Thanks :zombie, then we will go with option 3 first in this bug, feel free to file a new bug or comment if any other opinions.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 5•2 years ago
|
||
Move common code into head.js
Assignee | ||
Comment 6•2 years ago
|
||
Depends on D159895
Updated•2 years ago
|
Updated•2 years ago
|
Description
•