Skip to content

Commit

Permalink
[JENKINS-74858] resolved some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tejasdrolia committed Nov 20, 2024
1 parent afe7d25 commit 7cfca70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -839,10 +839,8 @@ public Details newInstance(StaplerRequest2 req, JSONObject formData) throws Form
throw new FormException("Please confirm the password by typing it twice", "user.password2");
}

if (FIPS140.useCompliantAlgorithms()) {
if (pwd.length()< FIPS_PASSWORD_LENGTH) {
throw new FormException(Messages.HudsonPrivateSecurityRealm_CreateAccount_FIPS_PasswordLengthInvalid(), "user.password1");
}
if (FIPS140.useCompliantAlgorithms() && pwd.length()< FIPS_PASSWORD_LENGTH) {
throw new FormException(Messages.HudsonPrivateSecurityRealm_CreateAccount_FIPS_PasswordLengthInvalid(), "user.password1");
}

// will be null if it wasn't encrypted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@
package hudson.security;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.startsWith;
import static org.junit.Assert.assertThrows;

import hudson.logging.LogRecorder;
import hudson.logging.LogRecorderManager;
import hudson.model.User;
Expand Down

0 comments on commit 7cfca70

Please sign in to comment.