Explorar o código

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

Romain Rigaux %!s(int64=7) %!d(string=hai) anos
pai
achega
a4f0e76
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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')