Эх сурвалжийг харах

Incorrect password allows to log into Hue when using pam_use_pwd_module with LDAP as a backend (#2629)

Jira: CDPD-31058
Mahesh Balakrishnan 4 жил өмнө
parent
commit
8f5521adc7

+ 1 - 1
desktop/core/src/desktop/auth/backend.py

@@ -594,7 +594,7 @@ class LdapBackend(object):
       LOG.warning("LDAP was not properly configured: %s", detail)
       return None
 
-    if AUTH.PAM_USE_PWD_MODULE.get():
+    if AUTH.PAM_USE_PWD_MODULE.get() and user is not None:
       LOG.debug('Setting LDAP username to %s using PAM pwd module for user %s' % (getpwnam(username).pw_name, username))
       pam_user = getpwnam(username).pw_name
       try: