采用同一名稱的多個 Struts2 validator 引用已存在。存在重復的驗證器引用表明該驗證不是最新的。
在 validators.xml 中,發現多個驗證器定義。若存在同名的多個驗證定義,可能導致非預期的行為。
如果兩個 validation class 具有相同的名稱,Struts Validator 會任意選擇其中一個 validation class 進行輸入驗證,而放棄另一個。這一決策可能不是程序員所期望的。而且,它也暗示著驗證邏輯沒有得到維護,并暗示著存在其他更難察覺的驗證錯誤。
驗證邏輯的維護至關重要,驗證邏輯必須與應用程序的其余部分保持同步。未經檢驗的輸入是導致當今一些最糟糕、最常見的軟件安全問題的根源。Cross-site scripting、SQL injection 和 process control 漏洞是由于缺少輸入驗證或者輸入驗證不完整造成的。雖然 J2EE 應用程序通常情況下不容易受到內存損壞的影響,但是如果 J2EE 應用程序連接到未執行數組邊界檢查的本地代碼,攻擊者就可能會利用 J2EE 應用程序中一個輸入校驗錯誤發起 buffer overflow 攻擊。
[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