Skip to content

Commit f4ce180

Browse files
committed
Close issue ESAPI#288. No, really! This time I *mean* it. :)
1 parent 46a625c commit f4ce180

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/test/java/org/owasp/esapi/reference/UserTest.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,15 @@ public void testChangePassword() throws Exception {
163163
} catch( AuthenticationException e ) {
164164
// expected
165165
}
166-
// Invalid test until we implement an actual password history!
167-
// try {
168-
// // Test for GitHub issue 288
169-
// user.changePassword(password2, oldPassword, oldPassword);
170-
// fail("Shouldn't be able to reuse original (initial) password.");
171-
// } catch( AuthenticationException e ) {
172-
// // expected
173-
// }
166+
try {
167+
// Test for GitHub issue 288; note that GitHub issue 287
168+
// needed fixed first, because that's what made the password
169+
// history work!
170+
user.changePassword(password2, oldPassword, oldPassword);
171+
fail("Shouldn't be able to reuse original (initial) password.");
172+
} catch( AuthenticationException e ) {
173+
// expected
174+
}
174175
assertTrue(user.verifyPassword(password2));
175176
assertFalse(user.verifyPassword("badpass"));
176177
}

0 commit comments

Comments
 (0)