Skip to content

Commit a42cb20

Browse files
Update TimingAttack.qll
1 parent 8153b79 commit a42cb20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/ql/src/experimental/semmle/python/security/TimingAttack.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ abstract class ClientSuppliedSecret extends API::CallNode { }
186186
private class FlaskClientSuppliedSecret extends ClientSuppliedSecret {
187187
FlaskClientSuppliedSecret() {
188188
this = Flask::request().getMember("headers").getMember(["get", "get_all", "getlist"]).getACall() and
189-
this.getParameter(0, ["key", "name"]).toString().toLowerCase() = sensitiveheaders()
189+
this.getParameter(0, "key").asSink().asExpr().(StrConst).getText().toLowerCase() = sensitiveheaders()
190190
}
191191
}
192192

@@ -197,7 +197,7 @@ private class DjangoClientSuppliedSecret extends ClientSuppliedSecret {
197197
.getMember(["headers", "META"])
198198
.getMember("get")
199199
.getACall() and
200-
this.getParameter(0, "key").toString().toLowerCase() = sensitiveheaders()
200+
this.getParameter(0, "key").asSink().asExpr().(StrConst).getText().toLowerCase() = sensitiveheaders()
201201
}
202202
}
203203

@@ -209,7 +209,7 @@ API::Node requesthandler() {
209209
private class TornadoClientSuppliedSecret extends ClientSuppliedSecret {
210210
TornadoClientSuppliedSecret() {
211211
this = requesthandler().getMember(["headers", "META"]).getMember("get").getACall() and
212-
this.getParameter(0, "key").toString().toLowerCase() = sensitiveheaders()
212+
this.getParameter(0, "key").asSink().asExpr().(StrConst).getText().toLowerCase() = sensitiveheaders()
213213
}
214214
}
215215

@@ -222,7 +222,7 @@ private class WerkzeugClientSuppliedSecret extends ClientSuppliedSecret {
222222
WerkzeugClientSuppliedSecret() {
223223
this =
224224
headers().getMember(["headers", "META"]).getMember(["get", "get_all", "getlist"]).getACall() and
225-
this.getParameter(0, ["key", "name"]).toString().toLowerCase() = sensitiveheaders()
225+
this.getParameter(0, "key").asSink().asExpr().(StrConst).getText().toLowerCase() = sensitiveheaders()
226226
}
227227
}
228228

0 commit comments

Comments
 (0)