Skip to content

Commit 701676e

Browse files
Alvaro Muñozerik-krogh
andauthored
Update javascript/ql/lib/semmle/javascript/frameworks/Spife.qll
Co-authored-by: Erik Krogh Kristensen <[email protected]>
1 parent 270a435 commit 701676e

File tree

1 file changed

+6
-7
lines changed
  • javascript/ql/lib/semmle/javascript/frameworks

1 file changed

+6
-7
lines changed

javascript/ql/lib/semmle/javascript/frameworks/Spife.qll

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,12 @@ module Spife {
165165
kind = "cookie"
166166
or
167167
// req.validatedBody.get('foo')
168-
exists(DataFlow::PropRead validated, DataFlow::MethodCallNode get |
169-
rh.getARequestSource().ref().getAPropertyRead() = validated and
170-
validated.getPropertyName().matches("validated%") and
171-
get.getReceiver() = validated and
172-
this = get and
173-
kind = "body"
174-
)
168+
this =
169+
rh.getARequestSource()
170+
.ref()
171+
.getAPropertyRead(any(string s | s.matches("validated%")))
172+
.getAMethodCall("get") and
173+
kind = "body"
175174
}
176175

177176
override RouteHandler getRouteHandler() { result = rh }

0 commit comments

Comments
 (0)