Multiple Struts2 field validator references with the same name exist. Duplicate validator references are an indication that validation is not up to date.
More than one field validator definition with the same name exist in ActionClass-validation.xml
. Duplicate validation definitions with the same name may result in unexpected behavior.
Example: The following entry shows two duplicate field validator definitions.
<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>
[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 - FIPS200 - (FISMA) CM
[5] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 101
[6] Standards Mapping - Payment Card Industry Data Security Standard Version 1.1 - (PCI 1.1) Requirement 6.5.10
[7] T. Husted et al. Struts in Action: Building Web Applications with the Leading Java Framework Manning Publications
[8] The Struts2 Validation Framework The Apache Foundation