Closed Bug 1270277 Opened 4 years ago Closed 4 years ago

nsClipboard::HasDataMatchingFlavors returns true for all flavors

Categories

(Core :: Widget: Android, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: enndeakin, Assigned: enndeakin)

Details

Attachments

(1 file)

The android clipboard only supports plaintext data. nsClipboard::HasDataMatchingFlavors returns true as long as some text exists on the clipboard, even if none of the flavors passed as arguments are text.

This is blocking a security bug due to test failures.
There
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED
Attached patch Implement thisSplinter Review
This also fixes a test broken by this patch that wasn't working as I think it was intended to. I believe the test was wanting to verify that all three flavors were supported yet hasDataMatchingFlavors only checks if any one of them is. It happened to pass as text/html matched on all platforms.
Attachment #8749588 - Flags: review?(snorp)
Attachment #8749588 - Flags: review?(snorp) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/bb36d2769fe3689817a8b33f9a6c0eb6d63ad1d2
Bug 1270277, HasDataMatchingFlavors should only return true for text/unicode, r=snorp
https://hg.mozilla.org/mozilla-central/rev/bb36d2769fe3
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.