mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 14:40:55 +03:00
Ignore messages posted to onmessage that aren't data urls
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user