Преглед изворни кода

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')