mirror of
https://github.com/github/codeql.git
synced 2026-04-25 00:35:20 +02:00
Fix tests
This commit is contained in:
@@ -19,6 +19,14 @@ public class WeakRandomCookies extends HttpServlet {
|
||||
int c = r.nextInt();
|
||||
// BAD: The cookie value may be predictable.
|
||||
Cookie cookie = new Cookie("name", Integer.toString(c)); // $hasWeakRandomFlow
|
||||
cookie.setValue(Integer.toString(c)); // $hasWeakRandomFlow
|
||||
|
||||
io.netty.handler.codec.http.Cookie nettyCookie =
|
||||
new io.netty.handler.codec.http.DefaultCookie("name", Integer.toString(c)); // $hasWeakRandomFlow
|
||||
nettyCookie.setValue(Integer.toString(c)); // $hasWeakRandomFlow
|
||||
io.netty.handler.codec.http.cookie.Cookie nettyCookie2 =
|
||||
new io.netty.handler.codec.http.cookie.DefaultCookie("name", Integer.toString(c)); // $hasWeakRandomFlow
|
||||
nettyCookie2.setValue(Integer.toString(c)); // $hasWeakRandomFlow
|
||||
|
||||
Encoder enc = null;
|
||||
int c2 = r.nextInt();
|
||||
|
||||
@@ -1 +1 @@
|
||||
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/servlet-api-2.4:${testdir}/../../../stubs/apache-commons-lang3-3.7:${testdir}/../../../stubs/esapi-2.0.1
|
||||
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/servlet-api-2.4:${testdir}/../../../stubs/apache-commons-lang3-3.7:${testdir}/../../../stubs/esapi-2.0.1:${testdir}/../../../stubs/netty-4.1.x
|
||||
|
||||
6
java/ql/test/stubs/netty-4.1.x/io/netty/handler/codec/http/Cookie.java
generated
Normal file
6
java/ql/test/stubs/netty-4.1.x/io/netty/handler/codec/http/Cookie.java
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
// Generated automatically from io.netty.handler.codec.http.cookie.Cookie for testing purposes
|
||||
|
||||
package io.netty.handler.codec.http;
|
||||
|
||||
public interface Cookie extends io.netty.handler.codec.http.cookie.Cookie {
|
||||
}
|
||||
9
java/ql/test/stubs/netty-4.1.x/io/netty/handler/codec/http/DefaultCookie.java
generated
Normal file
9
java/ql/test/stubs/netty-4.1.x/io/netty/handler/codec/http/DefaultCookie.java
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
// Generated automatically from io.netty.handler.codec.http.cookie.DefaultCookie for testing
|
||||
// purposes
|
||||
|
||||
package io.netty.handler.codec.http;
|
||||
|
||||
public class DefaultCookie extends io.netty.handler.codec.http.cookie.DefaultCookie
|
||||
implements Cookie {
|
||||
public DefaultCookie(String p0, String p1) {}
|
||||
}
|
||||
Reference in New Issue
Block a user