Skip to content

Commit c3a2ae2

Browse files
author
Alvaro Muñoz
committed
Account for public fields/setters
1 parent c089368 commit c3a2ae2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

java/ql/lib/semmle/code/java/frameworks/struts/Struts2Serializability.qll

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ private class Struts2ActionField extends DeserializableField {
3636
exists(Struts2DeserializableType superType |
3737
superType = this.getDeclaringType().getAnAncestor() and
3838
not superType instanceof TypeObject and
39-
superType.fromSource()
39+
superType.fromSource() and
40+
(
41+
this.isPublic()
42+
or
43+
exists(SetterMethod setter | setter.getField() = this and setter.isPublic())
44+
)
4045
)
4146
}
4247
}

0 commit comments

Comments
 (0)