knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kris...@apache.org
Subject knox git commit: KNOX-1094 - Ensure inner exception is captured on LDAP failure
Date Tue, 13 Nov 2018 17:05:09 GMT
Repository: knox
Updated Branches:
  refs/heads/master fbd39232a -> f32d86085


KNOX-1094 - Ensure inner exception is captured on LDAP failure

Signed-off-by: Kevin Risden <krisden@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/f32d8608
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/f32d8608
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/f32d8608

Branch: refs/heads/master
Commit: f32d86085ebd7ce918be9faddc6f612e3ed1b9f0
Parents: fbd3923
Author: Kevin Risden <krisden@apache.org>
Authored: Sat Nov 10 08:59:46 2018 -0500
Committer: Kevin Risden <krisden@apache.org>
Committed: Tue Nov 13 12:04:40 2018 -0500

----------------------------------------------------------------------
 .../java/org/apache/knox/gateway/shirorealm/KnoxLdapRealm.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/f32d8608/gateway-provider-security-shiro/src/main/java/org/apache/knox/gateway/shirorealm/KnoxLdapRealm.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-shiro/src/main/java/org/apache/knox/gateway/shirorealm/KnoxLdapRealm.java
b/gateway-provider-security-shiro/src/main/java/org/apache/knox/gateway/shirorealm/KnoxLdapRealm.java
index 615bb9e..3c06d30 100644
--- a/gateway-provider-security-shiro/src/main/java/org/apache/knox/gateway/shirorealm/KnoxLdapRealm.java
+++ b/gateway-provider-security-shiro/src/main/java/org/apache/knox/gateway/shirorealm/KnoxLdapRealm.java
@@ -729,9 +729,9 @@ public class KnoxLdapRealm extends JndiLdapRealm {
         }
       } catch (AuthenticationException e) {
         LOG.failedToGetSystemLdapConnection(e);
-        throw new IllegalArgumentException("Illegal principal name: " + principal);
+        throw new IllegalArgumentException("Illegal principal name: " + principal, e);
       } catch (NamingException e) {
-        throw new IllegalArgumentException("Hit NamingException: " + e.getMessage());
+        throw new IllegalArgumentException("Hit NamingException", e);
       } finally {
         try {
           if (searchResultEnum != null) {


Mime
View raw message