Merge pull request #1760 from matrix-org/matthew/improve-postmessage-origin-check2
improve origin check of ScalarMessaging postmessage API.pull/21833/head
commit
715198dc17
|
@ -563,7 +563,7 @@ const onMessage = function(event) {
|
|||
const url = SdkConfig.get().integrations_ui_url;
|
||||
if (
|
||||
event.origin.length === 0 ||
|
||||
!url.startsWith(event.origin) ||
|
||||
!url.startsWith(event.origin + '/') ||
|
||||
!event.data.action ||
|
||||
event.data.api // Ignore messages with specific API set
|
||||
) {
|
||||
|
|
Loading…
Reference in New Issue