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(
|
window.addEventListener(
|
||||||
'message',
|
'message',
|
||||||
event => {
|
event => {
|
||||||
|
if (typeof event.data !== 'string' || !event.data.startsWith('data:')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
fetch(event.data)
|
fetch(event.data)
|
||||||
.then(res => res.blob())
|
.then(res => res.blob())
|
||||||
.then(blob => {
|
.then(blob => {
|
||||||
|
|
|
@ -14418,7 +14418,7 @@
|
||||||
},
|
},
|
||||||
"sax": {
|
"sax": {
|
||||||
"version": "1.2.1",
|
"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="
|
"integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o="
|
||||||
},
|
},
|
||||||
"schema-utils": {
|
"schema-utils": {
|
||||||
|
|
Loading…
Reference in New Issue