Merge pull request #366 from litvinovg/password_limit
raised password length limit to 64 characters
This commit is contained in:
commit
9b6e362480
2 changed files with 3 additions and 2 deletions
|
@ -15,7 +15,7 @@ import org.apache.commons.lang3.RandomStringUtils;
|
||||||
*/
|
*/
|
||||||
public class UserAccount {
|
public class UserAccount {
|
||||||
public static final int MIN_PASSWORD_LENGTH = 6;
|
public static final int MIN_PASSWORD_LENGTH = 6;
|
||||||
public static final int MAX_PASSWORD_LENGTH = 12;
|
public static final int MAX_PASSWORD_LENGTH = 64;
|
||||||
|
|
||||||
public enum Status {
|
public enum Status {
|
||||||
ACTIVE, INACTIVE;
|
ACTIVE, INACTIVE;
|
||||||
|
|
|
@ -14,6 +14,7 @@ import java.util.Collections;
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.RandomStringUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
|
@ -156,7 +157,7 @@ public class ProgramLoginTest extends AbstractTestClass {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void newPasswordTooLong() {
|
public void newPasswordTooLong() {
|
||||||
executeRequest(NEW_USER_NAME, NEW_USER_PASSWORD, "reallyLongPassword");
|
executeRequest(NEW_USER_NAME, NEW_USER_PASSWORD, RandomStringUtils.randomAlphanumeric(UserAccount.MAX_PASSWORD_LENGTH + 1));
|
||||||
assert403();
|
assert403();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue