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

    Struts 2: Duplicate Action Field Validators

    ABSTRACT

    采用同一名稱的多個 Struts2 field validator 引用已存在。存在重復的驗證器引用表明該驗證不是最新的。

    EXPLANATION

    ActionClass-validation.xml 中,存在多個采用相同名稱的字段驗證器定義。若存在同名的重復驗證定義,可能導致非預期的行為。

    例如: 下列條目顯示了兩個重復的字段驗證器定義。


    <field name="emailField">
    <field-validator type="email" short-circuit="true">
    <message>You must enter a value for email.</message>
    </field-validator>
    <field-validator type="email" short-circuit="true">
    <message>Not a valid e-mail.</message>
    </field-validator>
    </field>


    驗證邏輯的維護至關重要,驗證邏輯必須與應用程序的其余部分保持同步。未經檢驗的輸入是導致當今一些最糟糕、最常見的軟件安全問題的根源。Cross-site scripting、SQL injection 和 process control 漏洞是由于缺少輸入驗證或者輸入驗證不完整造成的。雖然 J2EE 應用程序通常情況下不容易受到內存損壞的影響,但是如果 J2EE 應用程序連接到未執行數組邊界檢查的本地代碼,攻擊者就可能會利用 J2EE 應用程序中一個輸入校驗錯誤發起 buffer overflow 攻擊。

    REFERENCES

    [1] Standards Mapping - OWASP Top 10 2004 - (OWASP 2004) A10 Insecure Configuration Management

    [2] Standards Mapping - OWASP Top 10 2010 - (OWASP 2010) A6 Security Misconfiguration

    [3] Standards Mapping - Security Technical Implementation Guide Version 3 - (STIG 3) APP3510 CAT I

    [4] Standards Mapping - Security Technical Implementation Guide Version 3.4 - (STIG 3.4) APP3510 CAT I

    [5] Standards Mapping - FIPS200 - (FISMA) CM

    [6] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 101

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

    [8] T. Husted et al. Struts in Action:Building Web Applications with the Leading Java Framework Manning Publications

    [9] The Struts2 Validation Framework The Apache Foundation


    Copyright 2013 Fortify Software - All rights reserved.
    (Generated from version 2013.1.1.0008 of the Fortify Secure Coding Rulepacks)
    desc.config.java.struts2_duplicate_action_field_validators

    97av