Warn the user when an unexpected script is loaded and prompt them to report it
Categories
(Core :: DOM: Security, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox143 | --- | fixed |
People
(Reporter: tjr, Assigned: tjr)
References
(Blocks 1 open bug)
Details
Attachments
(18 files, 4 obsolete files)
|
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 | |
|
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 | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
3.05 KB,
text/plain
|
Details | |
|
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 | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
4.03 KB,
text/plain
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
There is a very small number of users we want to show this to so we can eliminate a remaining blocker for deploying script hardening in the parent process
| Assignee | ||
Comment 1•8 months ago
|
||
This adds an observer to browser.js and because experimentally
it seems like sometimes an unexpected script is loaded prior
to the observer being added in browser-init, we also store
the very first unexpected script seen in nsContentSecurityUtils
and check for it when adding the observer.
It is intentional that we will only show the notification bar
once, for the first script seen, so while the logic to only show
it once is not present, the inherent limitation in this code
is intentional.
| Assignee | ||
Comment 2•8 months ago
|
||
Use the scriptName in the notification bar and add the
text and the bottons, as well as a Learn More link
| Assignee | ||
Comment 3•8 months ago
|
||
| Assignee | ||
Comment 4•8 months ago
|
||
| Assignee | ||
Comment 5•8 months ago
|
||
The buttons slightly change based on whether the user pressed
'Approve' or 'Block' from the notificaiton bar, so create the
JavaScript class that will run in the dialog and move the buttons
around based on how we opened the dialog.
| Assignee | ||
Comment 6•8 months ago
|
||
We use event telemetry because the affected users is so low (<1000)
it will be easier to query and ultimately use less space than adding
fields to the main ping.
| Assignee | ||
Comment 7•8 months ago
|
||
We want the notification bar to be visible on all windows unless it
has been explicitly actioned. If the user opens the dialog from a
different tab, we don't want the dialog to remain open on some other
tab or some other window, so we jump through some hoops to ensure only
one dialog is ever opened.
| Assignee | ||
Comment 8•8 months ago
|
||
To test this patchset, apply the following patch that will turn off crashing for debug/nightly builds and also re-enable the filename validation for pac scripts.
Then in Settings -> Network Settings -> Set an "automatic proxy configuration url" to https://ritter.vg/misc/ff/pac-script.js (or really any URL - this script isn't a valid PAC despite my attempts, but it doesn't actually matter.)
This will cause the infobar to be shown immediately on startup. This is testing the codepath where we're using checkInitialState, and GetVeryFirstUnexpectedScriptFilename instead of the UnexpectedJavaScriptLoad-Live codepath. But the -Live codepath can be tested by just enabling the same setting in an already-running browser.
| Assignee | ||
Comment 9•8 months ago
|
||
| Assignee | ||
Comment 10•8 months ago
|
||
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
| Assignee | ||
Comment 11•8 months ago
|
||
| Assignee | ||
Comment 12•8 months ago
|
||
Updating the testing patch to apply cleanly in the whole patch stack
| Assignee | ||
Comment 13•8 months ago
|
||
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
| Assignee | ||
Comment 14•8 months ago
|
||
| Assignee | ||
Comment 15•8 months ago
|
||
| Assignee | ||
Comment 16•8 months ago
|
||
Updated•8 months ago
|
| Assignee | ||
Comment 17•8 months ago
|
||
| Assignee | ||
Comment 18•8 months ago
|
||
| Assignee | ||
Comment 19•8 months ago
|
||
This is much cleaner, and consistent, aside from the weird threading issue.
Updated•8 months ago
|
| Assignee | ||
Comment 20•8 months ago
|
||
While the best user experience would be to add a link to take
them to that part of the Settings page, while closing the dialog,
given the number of users who will see this, I'm not going to add
the complexity
| Assignee | ||
Comment 21•8 months ago
|
||
| Assignee | ||
Comment 22•8 months ago
|
||
Comment 23•8 months ago
|
||
Comment 24•8 months ago
|
||
Comment 25•7 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/6af45139c379
https://hg.mozilla.org/mozilla-central/rev/cefa50545d4d
https://hg.mozilla.org/mozilla-central/rev/fd2c3fe94952
https://hg.mozilla.org/mozilla-central/rev/1408b1d237e9
https://hg.mozilla.org/mozilla-central/rev/1f099a6d9c67
https://hg.mozilla.org/mozilla-central/rev/ccd0e47157a7
https://hg.mozilla.org/mozilla-central/rev/fba09b577729
https://hg.mozilla.org/mozilla-central/rev/21a414b5908b
https://hg.mozilla.org/mozilla-central/rev/2aed18a1ddb7
https://hg.mozilla.org/mozilla-central/rev/4a9b07395da1
https://hg.mozilla.org/mozilla-central/rev/102d7fada30a
https://hg.mozilla.org/mozilla-central/rev/d90016b3c253
https://hg.mozilla.org/mozilla-central/rev/909a06a9f1d7
https://hg.mozilla.org/mozilla-central/rev/6704df26e880
https://hg.mozilla.org/mozilla-central/rev/d666ebea28fc
https://hg.mozilla.org/mozilla-central/rev/18036eec06a3
Updated•7 months ago
|
Description
•