Skip to content
Snippets Groups Projects
Commit 2b957369 authored by Brian Major's avatar Brian Major
Browse files

t72306 - check for empty password string

parent a6bc9002
No related branches found
No related tags found
No related merge requests found
...@@ -153,9 +153,9 @@ public class LoginServlet<T extends Principal> extends HttpServlet ...@@ -153,9 +153,9 @@ public class LoginServlet<T extends Principal> extends HttpServlet
String userID = request.getParameter("username"); String userID = request.getParameter("username");
String password = request.getParameter("password"); String password = request.getParameter("password");
if (userID == null) if (userID == null || userID.length() == 0)
throw new IllegalArgumentException("Missing username"); throw new IllegalArgumentException("Missing username");
if (password == null) if (password == null || password.length() == 0)
throw new IllegalArgumentException("Missing password"); throw new IllegalArgumentException("Missing password");
userID = userID.trim(); userID = userID.trim();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment