diff --git a/insecureinc/src/main/java/insecure/inc/Crypto.java b/insecureinc/src/main/java/insecure/inc/Crypto.java index 903ce3f9..f146d214 100644 --- a/insecureinc/src/main/java/insecure/inc/Crypto.java +++ b/insecureinc/src/main/java/insecure/inc/Crypto.java @@ -11,16 +11,12 @@ import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Base64; -import javax.crypto.spec.IvParameterSpec; -import javax.crypto.spec.SecretKeySpec; /** * Handles Crypto functions */ public class Crypto { private static final String HASH_ALG="SHA-256"; - private static SecretKeySpec key = null; - private static IvParameterSpec iv = null; private static String masterSalt = ""; private static Crypto instance = null; diff --git a/insecureinc/src/main/java/insecure/inc/Cwe434FileUpload.java b/insecureinc/src/main/java/insecure/inc/Cwe434FileUpload.java index b2046b8d..fa65835f 100644 --- a/insecureinc/src/main/java/insecure/inc/Cwe434FileUpload.java +++ b/insecureinc/src/main/java/insecure/inc/Cwe434FileUpload.java @@ -81,7 +81,6 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) } private String getFileName(final Part part) { - final String partHeader = part.getHeader("content-disposition"); for (String content : part.getHeader("content-disposition").split(";")) { if (content.trim().startsWith("filename")) { return content.substring( diff --git a/insecureinc/src/main/java/insecure/inc/Cwe611FileUpload.java b/insecureinc/src/main/java/insecure/inc/Cwe611FileUpload.java index 163f77f2..651933ef 100644 --- a/insecureinc/src/main/java/insecure/inc/Cwe611FileUpload.java +++ b/insecureinc/src/main/java/insecure/inc/Cwe611FileUpload.java @@ -54,7 +54,6 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response) } private String getFileName(final Part part) { - final String partHeader = part.getHeader("content-disposition"); for (String content : part.getHeader("content-disposition").split(";")) { if (content.trim().startsWith("filename")) { return content.substring( diff --git a/insecureinc/src/main/java/insecure/inc/EmbeddedDB.java b/insecureinc/src/main/java/insecure/inc/EmbeddedDB.java index c52b31b1..8b41e639 100644 --- a/insecureinc/src/main/java/insecure/inc/EmbeddedDB.java +++ b/insecureinc/src/main/java/insecure/inc/EmbeddedDB.java @@ -10,7 +10,6 @@ import java.sql.Driver; import java.sql.DriverManager; import java.sql.PreparedStatement; -import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Random; @@ -26,7 +25,6 @@ public void createDB() { PreparedStatement pstmt; Statement stmt; - ResultSet rs = null; String createSQL = "create table users (usr varchar(30), pwd varchar(30))"; diff --git a/insecureinc/src/main/java/insecure/inc/Util.java b/insecureinc/src/main/java/insecure/inc/Util.java index 3fdfbd3f..09e1a947 100644 --- a/insecureinc/src/main/java/insecure/inc/Util.java +++ b/insecureinc/src/main/java/insecure/inc/Util.java @@ -246,7 +246,6 @@ public static String executePwdProg(String userPwd,String sourceFile) throws IOE stdIn.flush(); stdIn.close(); p.waitFor(); - StringBuilder sb = new StringBuilder(); if(p.exitValue() == 0){ reader = new BufferedReader(new InputStreamReader(p.getInputStream())); diff --git a/insecureinc/src/main/webapp/cwe352loggedin.jsp b/insecureinc/src/main/webapp/cwe352loggedin.jsp index a50d4654..e2e9e3e2 100644 --- a/insecureinc/src/main/webapp/cwe352loggedin.jsp +++ b/insecureinc/src/main/webapp/cwe352loggedin.jsp @@ -79,7 +79,7 @@ function getProfile(){
diff --git a/insecureinc/src/main/webapp/cwe79loggedin.jsp b/insecureinc/src/main/webapp/cwe79loggedin.jsp index 703e2950..2d25666e 100644 --- a/insecureinc/src/main/webapp/cwe79loggedin.jsp +++ b/insecureinc/src/main/webapp/cwe79loggedin.jsp @@ -102,7 +102,7 @@ function getProfile(){ diff --git a/insecureinc/src/main/webapp/cwe862loggedin.jsp b/insecureinc/src/main/webapp/cwe862loggedin.jsp index 90c045cd..cadd863d 100644 --- a/insecureinc/src/main/webapp/cwe862loggedin.jsp +++ b/insecureinc/src/main/webapp/cwe862loggedin.jsp @@ -28,7 +28,7 @@ else{