Skip to content

Commit c568a94

Browse files
committed
Remove <> qualifier from ResponseEntity name
This was an extractor bug that was fixed recently
1 parent f0d5520 commit c568a94

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

java/ql/src/experimental/Security/CWE/CWE-601/SpringUrlRedirect.qll

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ private class SpringViewUrlRedirectSink extends SpringUrlRedirectSink {
8282
*/
8383
private class SpringResponseEntityUrlRedirectSink extends SpringUrlRedirectSink {
8484
SpringResponseEntityUrlRedirectSink() {
85-
// Find `new ResponseEntity<>(httpHeaders, ...)` or
86-
// `new ResponseEntity<>(..., httpHeaders, ...)` sinks
85+
// Find `new ResponseEntity(httpHeaders, ...)` or
86+
// `new ResponseEntity(..., httpHeaders, ...)` sinks
8787
exists(ClassInstanceExpr cie, Argument argument |
8888
cie.getConstructedType() instanceof SpringResponseEntity and
8989
argument.getType() instanceof SpringHttpHeaders and
@@ -96,8 +96,7 @@ private class SpringResponseEntityUrlRedirectSink extends SpringUrlRedirectSink
9696
exists(MethodAccess ma |
9797
ma.getMethod()
9898
.getDeclaringType()
99-
.hasQualifiedName("org.springframework.http",
100-
"ResponseEntity<>$HeadersBuilder<BodyBuilder>") and
99+
.hasQualifiedName("org.springframework.http", "ResponseEntity$HeadersBuilder<BodyBuilder>") and
101100
ma.getMethod().getName() in ["headers", "location"] and
102101
this.asExpr() = ma.getArgument(0)
103102
)

0 commit comments

Comments
 (0)