fix(tracker): add more security to canvas el capture

This commit is contained in:
nick-delirium 2024-01-09 13:11:10 +01:00
parent 6e1228cd65
commit 261239bd30

View file

@ -27,7 +27,12 @@ class CanvasRecorder {
startTracking() {
this.app.nodes.attachNodeCallback((node: Node): void => {
const id = this.app.nodes.getID(node)
if (!id || !hasTag(node, 'canvas') || this.snapshots[id]) {
if (!id) {
return
}
const isIgnored = this.app.sanitizer.isObscured(id) || this.app.sanitizer.isHidden(id)
if (isIgnored || !hasTag(node, 'canvas') || this.snapshots[id]) {
return
}
const ts = this.app.timestamp()