directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject directory-fortress-core git commit: FC-57 - Fortress testCreateSession fails negative test
Date Wed, 11 Feb 2015 00:23:37 GMT
Repository: directory-fortress-core
Updated Branches:
  refs/heads/master d405c03dc -> 786f582b7


FC-57 - Fortress testCreateSession fails negative test


Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/commit/786f582b
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/786f582b
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/786f582b

Branch: refs/heads/master
Commit: 786f582b7a52330c7f3ba6e36369e8e3a69a4b6f
Parents: d405c03
Author: Shawn McKinney <smckinney@apache.org>
Authored: Tue Feb 10 18:23:25 2015 -0600
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Tue Feb 10 18:23:25 2015 -0600

----------------------------------------------------------------------
 .../java/org/apache/directory/fortress/core/rbac/UserDAO.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/786f582b/src/main/java/org/apache/directory/fortress/core/rbac/UserDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/UserDAO.java b/src/main/java/org/apache/directory/fortress/core/rbac/UserDAO.java
index 6b8d57f..c42517a 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/UserDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/UserDAO.java
@@ -859,7 +859,7 @@ final class UserDAO extends ApacheDsDataProvider
      *
      * @throws org.apache.directory.fortress.core.SecurityException
      */
-    final Session checkPassword( User user ) throws FinderException
+    final Session checkPassword( User user ) throws FinderException, PasswordException
     {
         Session session = null;
         LdapConnection ld = null;
@@ -873,9 +873,10 @@ final class UserDAO extends ApacheDsDataProvider
             BindResponse bindResponse =  bind( ld, userDn, user.getPassword() );
             if(bindResponse.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS)
             {
-                String info = "checkPassword INVALID PASSWORD for userId [" + user.getUserId()
+ "]";
+                String info = "checkPassword INVALID PASSWORD for userId [" + user.getUserId()
+ "], resultCode [" + bindResponse.getLdapResult().getResultCode() + "]";
                 session.setMsg( info );
                 session.setErrorId( GlobalErrIds.USER_PW_INVLD );
+                throw new PasswordException( GlobalErrIds.USER_PW_INVLD, info );
             }
             PasswordPolicy respCtrl = getPwdRespCtrl( bindResponse );
             if ( respCtrl != null )


Mime
View raw message