CWE-608: Struts: Non-private Field in ActionForm Class
Struts: Non-private Field in ActionForm Class
Weakness ID: 608 (Weakness Variant)
Status: Draft
Description
Description Summary
An ActionForm class contains a field that has not been declared
private, which can be accessed without using a setter or
getter.
Time of Introduction
Implementation
Applicable Platforms
Languages
Java
Potential Mitigations
Phase
Description
Make all fields private. Use getter to get the value of the field.
Setter should be used only by the framework; setting an action form
field from other actions is bad practice and should be avoided.
Weakness Ordinalities
Ordinality
Description
Primary
(where the
weakness exists independent of other weaknesses)