RFR: 7820: Add validations for master password [v3]
Christoph Langer
clanger at openjdk.org
Wed Jul 27 21:08:08 UTC 2022
On Wed, 27 Jul 2022 15:56:30 GMT, Suchita Chaturvedi <schaturvedi at openjdk.org> wrote:
>> This PR adds password validations for master password field.
>
> Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision:
>
> Implemented review comments
Thanks for the update. Nearly close from my POV, just few minor nits.
application/org.openjdk.jmc.ui.common/src/main/java/org/openjdk/jmc/ui/common/security/PersistentCredentials.java line 89:
> 87:
> 88: public static boolean isPasswordValid(final String password) {
> 89:
empty line can be removed
application/tests/org.openjdk.jmc.ui.test/src/test/java/org/openjdk/jmc/ui/test/security/MasterPasswordTest.java line 44:
> 42: public class MasterPasswordTest {
> 43:
> 44: private final String invalidPwdValue = "Jmc20"; // Invalid Length, Missing alphanumeric
You mean missing special character (instead of alphanumeric), no?
application/tests/org.openjdk.jmc.ui.test/src/test/java/org/openjdk/jmc/ui/test/security/MasterPasswordTest.java line 46:
> 44: private final String invalidPwdValue = "Jmc20"; // Invalid Length, Missing alphanumeric
> 45: private final String validPwdValue = "Jmc at 2022"; // Following all standards
> 46: private final String invalidPwdValue1 = "Jmcu2022"; // Missing alphanumeric
Same here: not alphanumeric but "special character"
application/tests/org.openjdk.jmc.ui.test/src/test/java/org/openjdk/jmc/ui/test/security/MasterPasswordTest.java line 64:
> 62:
> 63: @Test
> 64: public void testInvalidPwdMissingAlphaNum() throws Exception {
should then rather be `testInvalidPwdMissingSpecialChar`
-------------
Changes requested by clanger (Committer).
PR: https://git.openjdk.org/jmc/pull/406
More information about the jmc-dev
mailing list