Skip to content

Commit 142d7ae

Browse files
smowtonam0o0
authored andcommitted
Make test compatible with Servlet 2.5; use old Servlet stubs
1 parent bf506f8 commit 142d7ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3
-1182
lines changed

java/ql/test/experimental/query-tests/security/CWE-347/JwtNoVerifier.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@
1212
import com.auth0.jwt.exceptions.JWTVerificationException;
1313
import com.auth0.jwt.interfaces.DecodedJWT;
1414

15-
@WebServlet(description = "", displayName = "", largeIcon = "", name = "JwtTest1", smallIcon = "", urlPatterns = {}, value = "/Auth", initParams = {}, asyncSupported = false, loadOnStartup = 0)
1615
public class JwtNoVerifier extends HttpServlet {
1716

18-
public void doPost(HttpServletRequest request, HttpServletResponse response) {
17+
public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
1918
response.setContentType("text/html");
2019
PrintWriter out = response.getWriter();
2120

@@ -35,7 +34,7 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) {
3534
out.println("</body></html>");
3635
}
3736

38-
public void doGet(HttpServletRequest request, HttpServletResponse response) {
37+
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
3938
response.setContentType("text/html");
4039
PrintWriter out = response.getWriter();
4140

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/auth0-java-jwt-4.4.0:${testdir}/../../../stubs/javax.servlet-api-4.0.1
1+
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/auth0-java-jwt-4.4.0:${testdir}/../../../../stubs/javax-servlet-2.5

java/ql/test/experimental/stubs/javax.servlet-api-4.0.1/javax/crypto/KeyGenerator.java

Lines changed: 0 additions & 26 deletions
This file was deleted.

java/ql/test/experimental/stubs/javax.servlet-api-4.0.1/javax/crypto/KeyGeneratorSpi.java

Lines changed: 0 additions & 16 deletions
This file was deleted.

java/ql/test/experimental/stubs/javax.servlet-api-4.0.1/javax/crypto/SecretKey.java

Lines changed: 0 additions & 11 deletions
This file was deleted.

java/ql/test/experimental/stubs/javax.servlet-api-4.0.1/javax/security/auth/Destroyable.java

Lines changed: 0 additions & 10 deletions
This file was deleted.

java/ql/test/experimental/stubs/javax.servlet-api-4.0.1/javax/servlet/AsyncContext.java

Lines changed: 0 additions & 31 deletions
This file was deleted.

java/ql/test/experimental/stubs/javax.servlet-api-4.0.1/javax/servlet/AsyncEvent.java

Lines changed: 0 additions & 20 deletions
This file was deleted.

java/ql/test/experimental/stubs/javax.servlet-api-4.0.1/javax/servlet/AsyncListener.java

Lines changed: 0 additions & 14 deletions
This file was deleted.

java/ql/test/experimental/stubs/javax.servlet-api-4.0.1/javax/servlet/DispatcherType.java

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)