Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1169#discussion_r50523073
  
    --- Diff: 
brooklyn-server/utils/common/src/test/java/org/apache/brooklyn/util/text/IdentifiersTest.java
 ---
    @@ -98,5 +96,17 @@ public void testJavaClassRegex() {
             
Assert.assertTrue("foo".matches(Identifiers.JAVA_GOOD_BINARY_REGEX));
             
Assert.assertTrue("foo.bar.Baz$1".matches(Identifiers.JAVA_GOOD_BINARY_REGEX));
         }
    +
    +    @Test
    +    public void testPassword() {
    +        String upper = "ABC";
    +        String numbers = "123";
    +        String symbols = "!£$";
    +        String id1 = Identifiers.makeRandomPassword(4, upper, numbers, 
symbols, Identifiers.PASSWORD_VALID_CHARS);
    --- End diff --
    
    anyone inspecting the code will be in a position to quite easily 
reconstruct passwords.
    the `makeRandomPassword` method could simply randomly reorder the result, 
and the test here check for containment rather than position.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to