Move handling of optional hosts and origins from using preferences to command line arguments
Categories
(Testing :: geckodriver, task, P2)
Tracking
(firefox100 fixed)
Tracking | Status | |
---|---|---|
firefox100 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
References
Details
(Whiteboard: [bidi-m3-mvp])
Attachments
(3 files, 2 obsolete files)
With bug 1750689 we got opt-in support for hosts and origins other then local loopback interfaces. With the current implementation we are making use of the following preferences:
- remote.hosts.allowed
- remote.origins.allowed
Given that these preferences could be set by users while testing a particular feature there is the risk that they forget to actually reset the preferences afterward.
To reduce this risk and to improve the security for our users we are going to move both settings to command line arguments for Firefox. That means that they are only valid for the current Firefox instance.
By making the changes to the Remote Agent we also have to update geckodriver at the same time and that before the 0.31.0 release.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Bug 1755312 comes with substantial changes to the wdspec tests which tests for this bug will need.
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
Depends on D142131
Assignee | ||
Comment 4•3 years ago
|
||
Depends on D142029
Assignee | ||
Comment 5•3 years ago
|
||
Depends on D142187
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 6•3 years ago
|
||
The Remote Agent expects the optional hosts and origins as
command line arguments now. As such geckodriver has to follow
and should no longer set the formerly used preferences.
Depends on D142188
Comment 8•3 years ago
|
||
Backed out for causing remote failures
- backout: https://hg.mozilla.org/integration/autoland/rev/8852c5e6bb2f03325e0c6b8e3388de094881c600
- push: https://treeherder.mozilla.org/jobs?repo=autoland&revision=f75298e767bb33bc5fe8b9d09e4cbcc3242b0ff3&group_state=expanded
- push where fails appeared: https://treeherder.mozilla.org/jobs?repo=autoland&searchStr=remote&revision=7e98afbea170f7404dc63552d32ff208204d5414
- failure log: https://treeherder.mozilla.org/logviewer?job_id=373105256&repo=autoland&lineNumber=2459
[task 2022-04-01T13:25:43.827Z] 13:25:43 INFO - TEST-UNEXPECTED-FAIL | remote/cdp/test/browser/browser_cdp.js | Uncaught exception in test - at chrome://mochitests/content/browser/remote/cdp/test/browser/chrome-remote-interface.js:8 - Error: WebSocket error
[task 2022-04-01T13:25:43.827Z] 13:25:43 INFO - Stack trace:
[task 2022-04-01T13:25:43.828Z] 13:25:43 INFO - CDP</e.exports</this._ws.onerror@chrome://mochitests/content/browser/remote/cdp/test/browser/chrome-remote-interface.js:8:515701
[task 2022-04-01T13:25:43.828Z] 13:25:43 INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-04-01T13:25:43.829Z] 13:25:43 INFO - TEST-UNEXPECTED-FAIL | remote/cdp/test/browser/browser_cdp.js | A promise chain failed to handle a rejection: The handshake request has incorrect Origin header null - stack: processRequest@chrome://remote/content/server/WebSocketHandshake.jsm:174:11
[task 2022-04-01T13:25:43.830Z] 13:25:43 INFO - serverHandshake@chrome://remote/content/server/WebSocketHandshake.jsm:246:41
[task 2022-04-01T13:25:43.830Z] 13:25:43 INFO - upgrade@chrome://remote/content/server/WebSocketHandshake.jsm:314:9
[task 2022-04-01T13:25:43.830Z] 13:25:43 INFO - handle@chrome://remote/content/cdp/targets/Target.jsm:58:48
[task 2022-04-01T13:25:43.831Z] 13:25:43 INFO - createHandlerFunc/<@chrome://remote/content/server/HTTPD.jsm:2134:13
[task 2022-04-01T13:25:43.831Z] 13:25:43 INFO - handleResponse@chrome://remote/content/server/HTTPD.jsm:2495:36
[task 2022-04-01T13:25:43.831Z] 13:25:43 INFO - process@chrome://remote/content/server/HTTPD.jsm:1354:26
[task 2022-04-01T13:25:43.832Z] 13:25:43 INFO - _handleResponse@chrome://remote/content/server/HTTPD.jsm:1801:22
[task 2022-04-01T13:25:43.832Z] 13:25:43 INFO - _processBody@chrome://remote/content/server/HTTPD.jsm:1646:14
[task 2022-04-01T13:25:43.832Z] 13:25:43 INFO - onInputStreamReady@chrome://remote/content/server/HTTPD.jsm:1525:14
[task 2022-04-01T13:25:43.832Z] 13:25:43 INFO - Rejection date: Fri Apr 01 2022 13:25:43 GMT+0000 (Coordinated Universal Time) - false == true - JS frame :: resource://testing-common/PromiseTestUtils.jsm :: assertNoUncaughtRejections :: line 271
[task 2022-04-01T13:25:43.833Z] 13:25:43 INFO - Stack trace:
[task 2022-04-01T13:25:43.833Z] 13:25:43 INFO - resource://testing-common/PromiseTestUtils.jsm:assertNoUncaughtRejections:271
[task 2022-04-01T13:25:43.833Z] 13:25:43 INFO - chrome://mochikit/content/browser-test.js:handleTask:1017
[task 2022-04-01T13:25:43.833Z] 13:25:43 INFO - Leaving test bound testCDP
[task 2022-04-01T13:25:43.834Z] 13:25:43 INFO - GECKO(1573) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2022-04-01T13:25:43.834Z] 13:25:43 INFO - GECKO(1573) | MEMORY STAT | vsize 11356MB | residentFast 474MB | heapAllocated 233MB
[task 2022-04-01T13:25:43.834Z] 13:25:43 INFO - TEST-OK | remote/cdp/test/browser/browser_cdp.js | took 682ms
Assignee | ||
Comment 9•3 years ago
|
||
This fails the remote browser-chrome tests because these still set the remote.allow.hosts
preference for the null
origin. With the browser chrome mochitests limited to not being able to set custom command line arguments via the browser.ini file (see 1762647) we can only revert these changes and make use of the null origin override again.
I already pushed an update for the patches which needs to be reviewed now.
Comment 10•3 years ago
|
||
Comment 11•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/17c8c0ce0027
https://hg.mozilla.org/mozilla-central/rev/19423b8e8165
https://hg.mozilla.org/mozilla-central/rev/2172553fa9e8
Updated•3 years ago
|
Updated•3 years ago
|
Description
•