[WO-03-008] Fix no Origin Checks for postMessage Communication (High)

This commit is contained in:
Tankred Hase 2015-04-23 17:09:10 +02:00
parent 4a681a73d2
commit 2aa166ac19
1 changed files with 5 additions and 0 deletions

View File

@ -12,6 +12,11 @@ DOMPurify.addHook('afterSanitizeAttributes', function(node) {
window.onmessage = function(e) {
var html = '';
// ignore messages from other origins to prevent XSS
if (e.origin !== location.origin) {
return;
}
if (e.data.html) {
// display html mail body
html = e.data.html;