Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed prototype pollution bug and only allow trusted origin (#17420)
  • Loading branch information
r0hanSH committed Feb 1, 2022
1 parent 54581d4 commit 4d6d4b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/embed.js
Expand Up @@ -15,7 +15,7 @@
window.addEventListener('message', function(e) {
var data = e.data || {};

if (data.type !== 'setHeight' || !iframes[data.id]) {
if (data.type !== 'setHeight' || !iframes[data.id] || window.location.origin !== e.origin || data.id.toString() === '__proto__') {
return;
}

Expand Down

0 comments on commit 4d6d4b4

Please sign in to comment.