We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d955dce commit 66b54f0Copy full SHA for 66b54f0
1 file changed
…/security/CWE-330/WeakRandomCookies.java …urity/CWE-330/InsecureRandomCookies.javajava/ql/test/query-tests/security/CWE-330/WeakRandomCookies.java renamed to java/ql/test/query-tests/security/CWE-330/InsecureRandomCookies.java
@@ -10,7 +10,7 @@
10
import org.apache.commons.lang3.RandomStringUtils;
11
import org.owasp.esapi.Encoder;
12
13
-public class WeakRandomCookies extends HttpServlet {
+public class InsecureRandomCookies extends HttpServlet {
14
HttpServletResponse response;
15
16
public void doGet() {
@@ -44,8 +44,8 @@ public void doGet() {
44
byte[] bytes2 = new byte[16];
45
sr.nextBytes(bytes2);
46
// GOOD: The cookie value is unpredictable.
47
- Cookie cookie4 = new Cookie("name", new String(bytes2));
48
-
+ Cookie cookie4 = new Cookie("name", new String(bytes2));
+
49
ThreadLocalRandom tlr = ThreadLocalRandom.current();
50
51
Cookie cookie5 = new Cookie("name", Integer.toString(tlr.nextInt())); // $hasWeakRandomFlow
0 commit comments