Skip to content
Permalink
Browse files
JENKINS-7096 - Stop users being created in memory if registration fails
  • Loading branch information
mc1arke committed Jan 14, 2012
1 parent f8f4860 commit 255a3e6dd67d91e74541293bf7d3ea696b01b6c1
Showing with 6 additions and 3 deletions.
  1. +3 −0 changelog.html
  2. +3 −3 core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
@@ -63,6 +63,9 @@
<li class="rfe">
OS X installer can optionally create a new user &quot;jenkins&quot; and use
it. This user has a writable home directory, making it possible to set up ssh for Jenkins.
<li class="bug">
Stop users being created in memory if they failed to provide all the required registration information correctly.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-7096">issue 7096</a>)
</ul>
</div><!--=TRUNK-END=-->

@@ -302,9 +302,9 @@ private User createAccount(StaplerRequest req, StaplerResponse rsp, boolean self
if(si.username==null || si.username.length()==0)
si.errorMessage = "User name is required";
else {
User user = User.get(si.username);
if(user.getProperty(Details.class)!=null)
si.errorMessage = "User name is already taken. Did you forget the password?";
User user = User.get(si.username, false);
if (null != user)
si.errorMessage = "User name is already taken";
}

if(si.fullname==null || si.fullname.length()==0)

0 comments on commit 255a3e6

Please sign in to comment.