Skip to content

Commit 2baf2aa

Browse files
torque59Alvaro Muñoz
andauthored
Apply suggestions from code review - improved sanitizer checks.
Co-authored-by: Alvaro Muñoz <[email protected]>
1 parent 40f4e71 commit 2baf2aa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

java/ql/src/Security/CWE/CWE-346/UnvalidatedCors.ql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ class CorsProbableCheckAccess extends MethodAccess {
3333
getMethod().hasName("contains") and
3434
getMethod().getDeclaringType().getASourceSupertype*() instanceof CollectionType
3535
or
36+
getMethod().hasName("containsKey") and
37+
getMethod().getDeclaringType().getASourceSupertype*() instanceof MapType
38+
or
3639
getMethod().hasName("equals") and
3740
getQualifier().getType() instanceof TypeString
3841
}

0 commit comments

Comments
 (0)