Merge pull request #1760 from matrix-org/matthew/improve-postmessage-origin-check2
improve origin check of ScalarMessaging postmessage API.
This commit is contained in:
commit
715198dc17
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue