mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
Update Test.java
This commit is contained in:
@@ -84,5 +84,15 @@ class Test {
|
||||
response.addCookie(cookie);
|
||||
}
|
||||
|
||||
{
|
||||
// GOOD: set secure flag in call to `createSecureCookie`
|
||||
response.addCookie(createSecureCookie());
|
||||
}
|
||||
}
|
||||
|
||||
private static Cookie createSecureCookie() {
|
||||
Cookie cookie = new Cookie("secret", "fakesecret");
|
||||
cookie.setSecure(constTrue);
|
||||
return cookie;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user