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
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•1 year 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•1 year 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•1 year ago
|
||
| Assignee | ||
Comment 4•1 year ago
|
||
| Assignee | ||
Comment 5•1 year 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•1 year 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•1 year 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•1 year 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•1 year ago
|
||
| Assignee | ||
Comment 10•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 11•1 year ago
|
||
| Assignee | ||
Comment 12•1 year ago
|
||
Updating the testing patch to apply cleanly in the whole patch stack
| Assignee | ||
Comment 13•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 14•1 year ago
|
||
| Assignee | ||
Comment 15•1 year ago
|
||
| Assignee | ||
Comment 16•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Comment 17•1 year ago
|
||
| Assignee | ||
Comment 18•1 year ago
|
||
| Assignee | ||
Comment 19•1 year ago
|
||
This is much cleaner, and consistent, aside from the weird threading issue.
Updated•1 year ago
|
| Assignee | ||
Comment 20•1 year 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•1 year ago
|
||
| Assignee | ||
Comment 22•1 year ago
|
||
Comment 23•1 year ago
|
||
Comment 24•1 year ago
|
||
Comment 25•1 year 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•1 year ago
|
Description
•