<dd id="sga4y"><optgroup id="sga4y"></optgroup></dd>
<nav id="sga4y"><code id="sga4y"></code></nav>
  • <optgroup id="sga4y"></optgroup>

    HTML5: Overly Permissive Message Posting Policy

    ABSTRACT

    程序發布了目標源過于寬松的跨文檔消息。

    EXPLANATION

    HTML5 的一項新功能是跨文檔發送消息。該功能可使腳本將消息發布到其他窗口。相應的 API 可使用戶指定目標窗口的來源。不過,指定目標源時應小心謹慎,因為如果目標源過于寬松,惡意腳本就能趁機采用不當方式與受攻擊的窗口進行通信,從而導致發生欺騙、數據被盜、轉發及其他攻擊。

    例 1:在以下示例中,采用了編程方式通過通配符指定要發送信息的目標源。


    o.contentWindow.postMessage(message, '*');


    使用 * 作為目標源的值表示無論來源如何,腳本都會將信息發送到窗口。

    REFERENCES

    [1] Philippe De Ryck, Lieven Desmet, Pieter Philippaerts, and Frank Piessens A Security Analysis of Next Generation Web Standards

    [2] Michael Schmidt HTML5 Web Security

    [3] Standards Mapping - Payment Card Industry Data Security Standard Version 1.1 - (PCI 1.1) Requirement 6.5.10


    Copyright 2013 Fortify Software - All rights reserved.
    (Generated from version 2013.1.1.0008 of the Fortify Secure Coding Rulepacks)
    desc.structural.javascript.html5_overly_permissive_message_posting_policy

    97av