Closed Bug 1741854 Opened 2 years ago Closed 2 years ago

Prevent private messagehandler commands from being called via the WebSocket connection

Categories

(Remote Protocol :: WebDriver BiDi, task, P2)

task
Points:
2

Tracking

(firefox99 fixed)

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: jdescottes, Assigned: whimboo, Mentored)

References

(Blocks 1 open bug)

Details

(Whiteboard: [bidi-m3-mvp][lang=js])

Attachments

(1 file)

MessageHandler modules might expose commands which are only meant to be used internally (mostly by other MessageHandler modules): for instance _subscribeEvent on the the log module: https://searchfox.org/mozilla-central/rev/bc5e79f3ae0f42cb4a6ebd05fc32f48a3829059d/remote/webdriver-bidi/modules/windowglobal/log.jsm#36

All those commands start with an "_", but other than this, they are identical to public commands which are supposed to be called by a WebDriver BiDi client over websocket.

Before we get an actual schema validation, we should prevent BiDi clients to directly call internal commands. For instance, this check could be performed at https://searchfox.org/mozilla-central/rev/bc5e79f3ae0f42cb4a6ebd05fc32f48a3829059d/remote/webdriver-bidi/WebDriverBiDiConnection.jsm#156

This should be relatively easy to implement, setting as mentored. I imagine we would test this via a wdspec test.
Not for milestone 2 though.

Mentor: jdescottes
Whiteboard: [webdriver:triage]
Blocks: 1713438
No longer depends on: 1731556
Whiteboard: [lang=js]
Blocks: 1753997
Points: --- → 2
Priority: -- → P3
Whiteboard: [lang=js] → [bidi-m3-mvp][lang=js]
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1aa2d8683e52
[webdriver-bidi] Prevent internal methods from being called via the WebSocket connection. r=webdriver-reviewers,jdescottes
Priority: P3 → P2
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: