浏览代码

HUE-8521 [auth] Protect against empty LDAP login username

Romain Rigaux 7 年之前
父节点
当前提交
a4f0e76
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/core/src/desktop/auth/forms.py

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

@@ -128,7 +128,7 @@ class LdapAuthenticationForm(AuthenticationForm):
 
   def authenticate(self):
     request = None
-    username = self.cleaned_data.get('username')
+    username = self.cleaned_data.get('username') or ''
     password = self.cleaned_data.get('password')
     server = self.cleaned_data.get('server')