Skip to content

Commit

Permalink
Merge pull request #2410 from getAlby/fix/limit-postmessage-to-origin
Browse files Browse the repository at this point in the history
fix: add window.location.origin to postMessage
  • Loading branch information
bumi authored Aug 5, 2023
2 parents b7ff9a5 + 95bba1e commit 047979a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/extension/content-script/onendalby.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function postMessage(ev, response) {
data: response,
scope: "alby",
},
"*"
window.location.origin
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/extension/content-script/onendnostr.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function postMessage(ev, response) {
data: response,
scope: "nostr",
},
"*"
window.location.origin
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/extension/content-script/onendwebbtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function postMessage(ev, response) {
data: response,
scope: SCOPE,
},
"*"
window.location.origin
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/extension/content-script/onendwebln.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function postMessage(ev, response) {
data: response,
scope: "webln",
},
"*"
window.location.origin
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/extension/providers/postMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function postMessage<T>(
scope: scope,
args,
},
"*" // TODO use origin
window.location.origin
);

function handleWindowMessage(messageEvent: MessageEvent) {
Expand Down

0 comments on commit 047979a

Please sign in to comment.