Repository: hive
Updated Branches:
  refs/heads/branch-1.2 27c42cf2f -> ff1f11785


HIVE-10572 - Improve Hive service test to check empty string (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/ff1f1178
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/ff1f1178
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/ff1f1178

Branch: refs/heads/branch-1.2
Commit: ff1f117857a341d70afe241a94a3032103aed449
Parents: 27c42cf
Author: Chao Sun <sunc...@apache.org>
Authored: Fri May 1 14:41:37 2015 -0700
Committer: Chao Sun <sunc...@apache.org>
Committed: Fri May 1 14:41:37 2015 -0700

----------------------------------------------------------------------
 .../apache/hive/service/auth/LdapAuthenticationProviderImpl.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/ff1f1178/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 854d078..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,7 +53,7 @@ public class LdapAuthenticationProviderImpl implements 
PasswdAuthenticationProvi
       user  = user + "@" + ldapDomain;
     }
 
-    if (password == null || password.isEmpty()) {
+    if (password == null || password.isEmpty() || password.getBytes()[0] == 0) 
{
       throw new AuthenticationException("Error validating LDAP user:" +
           " a null or blank password has been provided");
     }

Reply via email to