[JENKINS-74858] resolved some comments

This commit is contained in:
Tejas 2024-11-20 21:49:20 +05:30
parent afe7d250b8
commit 7cfca7066e
No known key found for this signature in database
GPG Key ID: F5DBA14141F2E77E
2 changed files with 7 additions and 5 deletions

View File

@ -839,10 +839,8 @@ public class HudsonPrivateSecurityRealm extends AbstractPasswordBasedSecurityRea
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

View File

@ -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;