fixes 2376: NPE when completing the user signup for a new user account

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@12277 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
david_calavera committed 2008-09-24 09:35:09 +00:00
1 parent b090d3b85d
commit bc37730890
1 file changed
+2 -2
@@ -122,10 +122,10 @@ public class HudsonPrivateSecurityRealm extends SecurityRealm implements ModelOb
if(selfRegistration && !validateCaptcha(si.captcha))
si.errorMessage = "Text didn't match the word shown in the image";
if(!si.password1.equals(si.password2))
if(si.password1 != null && !si.password1.equals(si.password2))
si.errorMessage = "Password didn't match";
if(si.password1.length()==0)
if(!(si.password1 != null && si.password1.length() != 0))
si.errorMessage = "Password is required";
if(si.username.length()==0)