We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
value
nodeLeadingToCsrfWrite
1 parent 017c73d commit 27a2cd3Copy full SHA for 27a2cd3
javascript/ql/src/Security/CWE-352/MissingCsrfMiddleware.ql
@@ -103,10 +103,11 @@ DataFlow::CallNode csrfMiddlewareCreation() {
103
*/
104
private DataFlow::SourceNode nodeLeadingToCsrfWrite(DataFlow::TypeBackTracker t) {
105
t.start() and
106
- exists(DataFlow::PropRef value |
107
- value = result.getAPropertyRead(cookieProperty()).getAPropertyWrite() and
108
- value.getPropertyName().regexpMatch("(?i).*(csrf|xsrf).*")
109
- )
+ result
+ .getAPropertyRead(cookieProperty())
+ .getAPropertyWrite()
+ .getPropertyName()
110
+ .regexpMatch("(?i).*(csrf|xsrf).*")
111
or
112
exists(DataFlow::TypeBackTracker t2 | result = nodeLeadingToCsrfWrite(t2).backtrack(t2, t))
113
}
0 commit comments