Skip to content

Commit fb71168

Browse files
committed
Close issue ESAPI#288.
1 parent 4365493 commit fb71168

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,13 @@ public void testChangePassword() throws Exception {
163163
} catch( AuthenticationException e ) {
164164
// expected
165165
}
166+
try {
167+
// Test for GitHub issue 288
168+
user.changePassword(password2, oldPassword, oldPassword);
169+
fail("Shouldn't be able to reuse original (initial) password.")
170+
} catch( AuthenticationException e ) {
171+
// expected
172+
}
166173
assertTrue(user.verifyPassword(password2));
167174
assertFalse(user.verifyPassword("badpass"));
168175
}

0 commit comments

Comments
 (0)