Skip to content

Commit e1f05e9

Browse files
author
Alvaro Muñoz
committed
Merge branch 'restify_improvements' of https://github.com/pwntester/codeql into restify_improvements
2 parents a71fc93 + 701676e commit e1f05e9

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)