tusury / vt-middleware

Automatically exported from code.google.com/p/vt-middleware
0 stars 0 forks source link

vt-password: AllowedCharacterRule validate error #147

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Use AllowedCharacterRule with alphanumeric 'A','a','2'...
2.Set password as alphanumeric...example: "jg4RSe2BsT32t"
3.validate the password

What is the expected output? What do you see instead?
- The result should return true as valid but instead it return false and 
randomly saying 'j' or 'g' is invalid char.
- Also I think if the ERROR_CODE changes to "NOT_ALLOWED_CHAR" would be better 
than "ALLOWED_CHAR"

What version of the product are you using? On what operating system?
vt-password-3.1.1

Please provide any additional information below.
not sure if it's a good solution but I manage to fix it by sorting the 
"allowedChar - Arrays.sort(allowedChar);" within the loop where it checks for 
the occurance of password's char inside the method "validate(final PasswordData 
passwordData)"

Original issue reported on code.google.com by kingchi...@gmail.com on 28 Mar 2013 at 9:57

GoogleCodeExporter commented 8 years ago
Can you provide a unit test that fails?
A patch for this class would be helpful:
https://code.google.com/p/vt-middleware/source/browse/vt-password/trunk/src/test
/java/edu/vt/middleware/password/AllowedCharacterRuleTest.java

Original comment by dfis...@gmail.com on 28 Mar 2013 at 3:29

GoogleCodeExporter commented 8 years ago
Could not reproduce, issue abandoned by the reporter.

Original comment by dfis...@gmail.com on 24 Apr 2013 at 9:12