Skip to content

Commit 1b3516a

Browse files
Apply suggestions from code review
Co-authored-by: Chris Smowton <[email protected]>
1 parent 09ae779 commit 1b3516a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

java/ql/src/semmle/code/java/security/UnsafeDeserialization.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ private class ObjectMapperReadSink extends DataFlow::ExprNode {
7878

7979
private class SetPolymorphicTypeValidatorSource extends DataFlow::ExprNode {
8080
SetPolymorphicTypeValidatorSource() {
81-
exists(MethodAccess ma, Method m, Expr q | m = ma.getMethod() and q = ma.getQualifier() |
81+
exists(MethodAccess ma, Method m | m = ma.getMethod() |
8282
(
8383
m.getDeclaringType() instanceof ObjectMapper and
8484
m.hasName("setPolymorphicTypeValidator")
8585
or
8686
m.getDeclaringType() instanceof MapperBuilder and
8787
m.hasName("polymorphicTypeValidator")
8888
) and
89-
this.asExpr() = q
89+
this.asExpr() = ma.getQualifier()
9090
)
9191
}
9292
}
@@ -196,7 +196,7 @@ private class EnableJacksonDefaultTypingConfig extends DataFlow2::Configuration
196196
}
197197

198198
/**
199-
* Tracks flow from calls, which set a type validator, to a subsequent Jackson deserialization method call,
199+
* Tracks flow from calls which set a type validator to a subsequent Jackson deserialization method call,
200200
* including across builder method calls.
201201
*
202202
* Such a Jackson deserialization method call is safe because validation will likely prevent instantiating unexpected types.

0 commit comments

Comments
 (0)