tracker: safety checks for message listeners, release 14.0.8

This commit is contained in:
nick-delirium 2024-09-30 12:31:23 +02:00
parent bc92568138
commit ba1fba3a85
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
4 changed files with 4 additions and 1 deletions

View file

@ -1,6 +1,7 @@
# 14.0.8
- use separate library to handle network requests ([@openreplay/network-proxy](https://www.npmjs.com/package/@openreplay/network-proxy))
- fixes for window.message listeners
# 14.0.7

Binary file not shown.

View file

@ -50,7 +50,7 @@
},
"dependencies": {
"@medv/finder": "^3.2.0",
"@openreplay/network-proxy": "^1.0.2",
"@openreplay/network-proxy": "^1.0.3",
"error-stack-parser": "^2.0.6",
"fflate": "^0.8.2"
},

View file

@ -360,6 +360,7 @@ export default class App {
let crossdomainFrameCount = 0
const catchIframeMessage = (event: MessageEvent) => {
const { data } = event
if (!data) return
if (data.line === proto.iframeSignal) {
const childIframeDomain = data.domain
const pageIframes = Array.from(document.querySelectorAll('iframe'))
@ -453,6 +454,7 @@ export default class App {
} else {
const catchParentMessage = (event: MessageEvent) => {
const { data } = event
if (!data) return
if (data.line !== proto.iframeId) {
return
}