Validation fields that do not appear in forms they are associated with indicate that the validation logic is out of date.
It is easy for developers to forget to update validation logic when they make changes to an ActionForm class. One indication that validation logic is not being properly maintained is inconsistencies between the action form and the validation form. Although J2EE applications are not generally susceptible to memory corruption attacks, if a J2EE application interfaces with native code that does not perform array bounds checking, an attacker may be able to use an input validation mistake in the J2EE application to launch a buffer overflow attack.
Threat Mapped score: 1.5
Industry: Finiancial
Threat priority: P4 - Informational (Low)
N/A
N/A
Phase | Note |
---|---|
Implementation | N/A |
Operation | N/A |
Intro: This example shows an inconsistency between an action form and a validation form. with a third field.
Body: This first block of code shows an action form that has two fields, startDate and endDate.
public class DateRangeForm extends ValidatorForm { String startDate, endDate; public void setStartDate(String startDate) { this.startDate = startDate; } public void setEndDate(String endDate) { this.endDate = endDate; } }