--- a/server/sources/ldapuser.py Fri Jun 25 11:29:48 2010 +0200
+++ b/server/sources/ldapuser.py Sat Jun 26 08:42:48 2010 +0000
@@ -293,7 +293,13 @@
raise AuthenticationError()
# check password by establishing a (unused) connection
try:
- self._connect(user, password)
+ if password:
+ self._connect(user, password)
+ else:
+ # On Windows + ADAM this would have succeeded (!!!)
+ # You get Authenticated as: 'NT AUTHORITY\ANONYMOUS LOGON'.
+ # we really really don't want that
+ raise Exception('No password provided')
except Exception, ex:
self.info('while trying to authenticate %s: %s', user, ex)
# Something went wrong, most likely bad credentials