Fixed prototype pollution bug and only allow trusted origin (#17420)

This commit is contained in:
Rohan Sharma 2022-02-01 22:04:48 +05:30 committed by GitHub
parent c7083702fa
commit e96b704def

View file

@ -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;
}