While inside Google Docs copying another text while a scan is ongoing will scan that text as well
Categories
(Firefox :: Data Loss Prevention, defect)
Tracking
()
People
(Reporter: atrif, Assigned: gstoll)
References
(Blocks 3 open bugs)
Details
Attachments
(7 files, 1 obsolete file)
2.09 MB,
image/gif
|
Details | |
779.48 KB,
image/gif
|
Details | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
Bug 1918027 part 2 - add ability for DataTransfer to bypass content analysis r=edgar,#dlp-reviewers!
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Found in
- 131.0b4
Affected versions
- 132.0a1 (2024-09-10)
- 131.0b4
Tested platforms
- Affected platforms: Windows 11, Windows 10
- Unaffected platforms:macOS 12, Ubuntu 22
Preconditoins
- Download the DLP test assets from https://drive.google.com/file/d/1yjqVRuxdKV3WnO7D2wzMgDXBuYBxUgVw/view
- Create a distribution folder inside the Firefox folder and paste the policies-1.json to it and then rename it to policies.json
- Run the DLP agent in CMD using: .\content_analysis_sdk_agent.exe --user --toblock=.\d{3}-?\d{2}-?\d{4}. --towarn=.warn. --delays=10
Steps to reproduce
- Open Google Docs.
- Copy a random text from another application and paste it inside Google Docs.
- While the scan is ongoing copy another text inside the clipboard (e.g 123456789)
Expected result
- Only the first text is scanned.
Actual result
- The text from step 3 is scanned as well.
Regression range
- Reproducible with Firefox 131.0b4. We will see if there is a regression.
Additional notes
- Attached a screen recording.
Assignee | ||
Comment 1•2 months ago
|
||
This is an unfortunate consequence of bug 1915351. Google Docs reads from the clipboard twice, and so if the clipboard contents change during the first scan it will scan the second contents. (most of the time we can skip the second DLP scan since the content is the same; the DLP result gets cached in the cache we added in bug 1912384)
Updated•2 months ago
|
Reporter | ||
Comment 2•24 days ago
•
|
||
Hello Greg! It seems that this issue now reproduces on Wikipedia and Gdocs after bug 1915351. With Firefox 132.0 I cannot reproduce the issue on the Wikipedia page, only on Gdocs.
Should we reopen this issue or file another one? Attached a screen recording (Note that I used Ctrl + C / Ctrl + V keyboard shortcut in the recording). Thank you!
Assignee | ||
Comment 3•23 days ago
|
||
Hi - since this bug was just covering this issue I'll just go ahead and reopen it. Thanks!
Assignee | ||
Comment 4•18 days ago
|
||
Very rough plan: keep track of the "paste number" for a given paste operation and use the same DataTransfer
object for all Content Analysis-related operations in that paste.
Assignee | ||
Comment 5•13 days ago
|
||
Note that this is tricky because JS code inside a paste
event is allowed to change the clipboard contents, and after that the new contents should be pasted into the element. Sigh.
Assignee | ||
Comment 6•5 days ago
|
||
Updated•5 days ago
|
Assignee | ||
Comment 7•5 days ago
|
||
Assignee | ||
Comment 8•5 days ago
|
||
Also fixes a problem with DataTransfer::Clone() where it wasn't propagating
the mClipboardDataSnapshot.
Assignee | ||
Comment 9•5 days ago
|
||
This handles a race condition so if the user copies new data to the clipboard
while Content Analysis is ongoing, the original data will be used in the
paste action.
Assignee | ||
Comment 10•5 days ago
|
||
Assignee | ||
Comment 11•5 days ago
|
||
text/x-moz-url data is supposed to have a newline and a description
- see this assertion on Windows: https://searchfox.org/mozilla-central/rev/f2df1ff64cb876e10c72ce7eed1fc9eac3f877bb/widget/windows/nsDataObj.cpp#1891-1893
This causes asserts in the test when run on Windows but it still passes,
which made me waste a bit of time investigating.
Updated•5 days ago
|
Updated•5 days ago
|
Updated•5 days ago
|
Updated•5 days ago
|
Updated•5 days ago
|
Description
•