Skip to content

Security model of message passing #814

@nothingismagick

Description

@nothingismagick

Is your feature request related to a problem? Please describe.
At this hackernews comment, a very good point was raised about the null origin.

Describe the solution you'd like
The OP wrote:

I recommend using pre-existing interfaces for launching apps like custom scheme URIs, or if really necessary writing individual handlers for the heavy lifting. I think the postMessage approach is great, too but it's vital that the caller origin is checked. The web app shouldn't need to run arbitrary commands on the computer.

Describe alternatives you've considered
Instead of allowing the webview to initiate an event, requiring the rust side to do so because we create a randomized handle for each event and can permit it to only be used once. In practice, today, we use the webview to create the event listener, however at build time we can anticipate exactly what listeners are needed - so at runtime we can prepare the proper handle

Additional context
http://archive.is/UXD8j

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions