You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid Cross Site Scripting Vectors To/From the Simulator Iframe (microsoft#7473)
* Check the origin of MessageEvents in the SimulatorDriver
* Move origin check into a helper function
* Move helper function into runtime.ts
* Have the embedded frame check the origin of th received message
* Use the simUrl when posting messages to the sim iframe
* Use the simUrl when creating or receiving messages from the sim iframe
* Add logging to messageOriginExpected
* Using * when posting to the sim iframe when running on local host
* Don't use the simUrl when posting messages to the parent window
* Use the SimDriver's origin when passing messages onto the parent window
* Don't test the origin in the simulator iframe
* Check only the main domain when receiving messages from the sim
* Include the SimDriver origin when loading a sim iframe
* Add more logging
* Use the parent origin when sending messages to the sim driver's parent window
* Only set the parent origin on the sim driver when it has a parent window
* Allow message from the sim domain, the current origin, and the given parent window's origin
* Include the parent origin in the streamer page so editors can send/receive message from the parent origin.
* Remove extra logging
* Remove the parent origin from the simulator search params
When we decide to check the origin of received messages in the simulator,
as well as when we post messages back to the simulator frame's parent window,
then we'll should put this back. That way, we'll be able to do something with
it, vs leaving it and having it do nothing.
* Remove empty line change from embed.ts
* Encode and decode the parentOrigin URI
* Use !== not != when checking the port and protocol of the given origin
* Don't include | null in type since strict null checking is disabled
* Use the current origin when sending messages to dependant editors
* Use a set of expected origins in the SimulatorDriver
* Minor fixes found in PR comments
* Remove use of pxt.reportException in the pxtsim
This is mostly due to size considerations as including the pxtlib
in pxtsim will increase the file size. Perhaps the analytics portion
of the lib can split out of pxtlib so other parts of the project that
want to use it can.
* Use an array instead of a Set for the expected origins
0 commit comments