Skip to content

Commit

Permalink
Rename test
Browse files Browse the repository at this point in the history
  • Loading branch information
atorralba committed Dec 13, 2023
1 parent d955dce commit 66b54f0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.apache.commons.lang3.RandomStringUtils;
import org.owasp.esapi.Encoder;

public class WeakRandomCookies extends HttpServlet {
public class InsecureRandomCookies extends HttpServlet {
HttpServletResponse response;

public void doGet() {
Expand Down Expand Up @@ -44,8 +44,8 @@ public void doGet() {
byte[] bytes2 = new byte[16];
sr.nextBytes(bytes2);
// GOOD: The cookie value is unpredictable.
Cookie cookie4 = new Cookie("name", new String(bytes2));
Cookie cookie4 = new Cookie("name", new String(bytes2));

ThreadLocalRandom tlr = ThreadLocalRandom.current();

Cookie cookie5 = new Cookie("name", Integer.toString(tlr.nextInt())); // $hasWeakRandomFlow
Expand Down

0 comments on commit 66b54f0

Please sign in to comment.