Update javascript/ql/src/experimental/Security/CWE-614/InsecureCookie.qll

Co-authored-by: Esben Sparre Andreasen <esbena@github.com>
This commit is contained in:
Alessio Della Libera
2020-08-16 14:32:51 +02:00
committed by GitHub
parent bfef84e1b5
commit ab20beba56

View File

@@ -115,8 +115,8 @@ module InsecureCookie {
result.asExpr() = this.asExpr().(ArrayExpr).getAnElement()
}
// A cookie is insecure if the 'secure' flag is not specified in the cookie definition.
override predicate isInsecure() {
// A cookie is insecure if the 'secure' flag is not specified in the cookie definition.
not exists(string s |
getCookieOptionsArgument().mayHaveStringValue(s) and
s.matches("%; secure%")