Repository: hive
Updated Branches:
  refs/heads/branch-1.1 f6977fd15 -> 6d8fd2e9a


HIVE-10573 - Improve Hive service for connection (Chao, reviewed by Thejas)


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

Branch: refs/heads/branch-1.1
Commit: 6d8fd2e9a7104c7d562ad3ffe32a1aa343a34460
Parents: f6977fd
Author: Chao Sun <sunc...@apache.org>
Authored: Fri May 1 17:09:34 2015 -0700
Committer: Chao Sun <sunc...@apache.org>
Committed: Fri May 1 17:09:34 2015 -0700

----------------------------------------------------------------------
 .../hive/service/auth/LdapAuthenticationProviderImpl.java       | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/6d8fd2e9/service/src/java/org/apache/hive/service/auth/LdapAuthenticationProviderImpl.java
----------------------------------------------------------------------
diff --git 
a/service/src/java/org/apache/hive/service/auth/LdapAuthenticationProviderImpl.java
 
b/service/src/java/org/apache/hive/service/auth/LdapAuthenticationProviderImpl.java
index 7292cd9..4e2ef90 100644
--- 
a/service/src/java/org/apache/hive/service/auth/LdapAuthenticationProviderImpl.java
+++ 
b/service/src/java/org/apache/hive/service/auth/LdapAuthenticationProviderImpl.java
@@ -53,6 +53,11 @@ public class LdapAuthenticationProviderImpl implements 
PasswdAuthenticationProvi
       user  = user + "@" + ldapDomain;
     }
 
+    if (password == null || password.isEmpty() || password.getBytes()[0] == 0) 
{
+      throw new AuthenticationException("Error validating LDAP user:" +
+          " a null or blank password has been provided");
+    }
+
     // setup the security principal
     String bindDN;
     if (baseDN == null) {

Reply via email to