Merge pull request #920 from mozilla/ignore-non-data-urls
Ignore messages posted to onmessage that aren't data urls
This commit is contained in:
commit
a8b305a84e
@ -4,6 +4,9 @@ export default function intentHandler(state, emitter) {
|
||||
window.addEventListener(
|
||||
'message',
|
||||
event => {
|
||||
if (typeof event.data !== 'string' || !event.data.startsWith('data:')) {
|
||||
return;
|
||||
}
|
||||
fetch(event.data)
|
||||
.then(res => res.blob())
|
||||
.then(blob => {
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -14418,7 +14418,7 @@
|
||||
},
|
||||
"sax": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "http://registry.npmjs.org/sax/-/sax-1.2.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz",
|
||||
"integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o="
|
||||
},
|
||||
"schema-utils": {
|
||||
|
Loading…
Reference in New Issue
Block a user