Skip to content

Commit 02e4150

Browse files
committed
Delete RedirectBuilderFlowConfig
1 parent effa2b1 commit 02e4150

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,11 @@ class SpringUrlRedirectSink extends DataFlow::Node {
5151
exists(ClassInstanceExpr cie |
5252
cie.getConstructedType().hasQualifiedName("org.springframework.web.servlet", "ModelAndView") and
5353
cie.getArgument(0) = this.asExpr() and
54-
exists(RedirectBuilderFlowConfig rstrbfc | rstrbfc.hasFlowToExpr(cie.getArgument(0)))
54+
exists(RedirectBuilderExpr rbe | rbe.getRightOperand() = this.asExpr())
5555
)
5656
}
5757
}
5858

59-
/** A data flow configuration tracing flow from remote sources to redirect builder expression. */
60-
private class RedirectBuilderFlowConfig extends DataFlow2::Configuration {
61-
RedirectBuilderFlowConfig() { this = "RedirectBuilderFlowConfig" }
62-
63-
override predicate isSource(DataFlow::Node src) { src instanceof RemoteFlowSource }
64-
65-
override predicate isSink(DataFlow::Node sink) {
66-
exists(RedirectBuilderExpr rbe | rbe.getRightOperand() = sink.asExpr())
67-
}
68-
}
69-
7059
/** A data flow configuration tracing flow from RedirectView object to calling setUrl method. */
7160
private class RedirectViewFlowConfig extends DataFlow2::Configuration {
7261
RedirectViewFlowConfig() { this = "RedirectViewFlowConfig" }

0 commit comments

Comments
 (0)