Pārlūkot izejas kodu

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

Romain Rigaux 7 gadi atpakaļ
vecāks
revīzija
a4f0e76
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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')