<span id="7ztzv"></span>
<sub id="7ztzv"></sub>

<span id="7ztzv"></span><form id="7ztzv"></form>

<span id="7ztzv"></span>

        <address id="7ztzv"></address>

            Struts: Erroneous validate() Method

            ABSTRACT

            該 validator 表單定義了一個 validate() 方法,但沒有調用 super.validate()

            EXPLANATION

            Struts Validator 使用表單的 validate() 方法,對照那些在相關校驗表單中定義的約束條件來檢測表單屬性的內容。這就意味著以下這些類具有一個 validate() 方法,該方法是校驗框架的一部分:


            ValidatorForm
            ValidatorActionForm
            DynaValidatorForm
            DynaValidatorActionForm


            如果要建立一個繼承上述類的類,并且您的這個類覆蓋 validate() 函數,強行實現自定義校驗邏輯,則您必須在 validate() 的實現方法中調用 super.validate()。如果不這么做,校驗框架就無法對照校驗表單來校驗表單中的內容。換言之,針對某個特定的表單,會禁用校驗框架。

            對表單來說,禁用校驗框架會使應用程序完全暴露在各種攻擊之下。未經校驗的輸入是導致各種漏洞的根源,如 cross-site scripting、process control 和 SQL injection。雖然 J2EE 應用程序通常情況下不容易受到內存損壞的影響,但是如果 J2EE 應用程序連接到未執行數組邊界檢查的本地代碼,攻擊者就可能會利用 J2EE 應用程序中一個輸入校驗錯誤發起 buffer overflow 攻擊。

            REFERENCES

            [1] Standards Mapping - OWASP Top 10 2004 - (OWASP 2004) A1 Unvalidated Input

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

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

            [4] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 103

            [5] Standards Mapping - Payment Card Industry Data Security Standard Version 1.2 - (PCI 1.2) Requirement 6.3.1.1

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

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

            [8] The Struts project The Apache Foundation


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

            <span id="7ztzv"></span>
            <sub id="7ztzv"></sub>

            <span id="7ztzv"></span><form id="7ztzv"></form>

            <span id="7ztzv"></span>

                  <address id="7ztzv"></address>

                      亚洲欧美在线