Skip to content

postMEssage第二个参数存在中危漏洞 #674

Open
@ZhangXiang521

Description

@ZhangXiang521

postMessage: function(type, data) {
if (global.parent !== global) {
global.parent.postMessage(JSON3.stringify({ global.parent.postMessage(JSON3.stringify({
global.parent.postMessage(JSON.stringify({ global.parent.postMessage(JSON.stringify({
windowId: module.exports.currentWindowId
, type: type
, data: data || ''
}), '');
typeof global.postMessage === 'object') && (!browser.isKonqueror()); } else {
debug('Cannot postMessage, no parent window.', type, data);
}
}
使用代码安全卫士扫描出
postMessage第二个参数
存在中危漏洞,如何整改,我可以传window.location.origin么,会不会影响源代码的正常功能

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions