[Erp5-report] r8813 - /erp5/trunk/products/ERP5Security/ERP5UserManager.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jul 26 20:37:46 CEST 2006


Author: jerome
Date: Wed Jul 26 20:37:45 2006
New Revision: 8813

URL: http://svn.erp5.org?rev=8813&view=rev
Log:
refuse users with empty login or empty passwords


Modified:
    erp5/trunk/products/ERP5Security/ERP5UserManager.py

Modified: erp5/trunk/products/ERP5Security/ERP5UserManager.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Security/ERP5UserManager.py?rev=8813&r1=8812&r2=8813&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Security/ERP5UserManager.py (original)
+++ erp5/trunk/products/ERP5Security/ERP5UserManager.py Wed Jul 26 20:37:45 2006
@@ -80,7 +80,7 @@
           return None
 
         def _authenticateCredentials(login, password, path):
-            if login is None or password is None:
+            if not login or not password:
                 return None
 
             user_list = self.getUserByLogin(login)
@@ -156,6 +156,8 @@
         Search the Catalog for login and return a list of person objects
         login can be a string list or a list of strings
         """
+        if not login:
+          return []
         # because we aren't logged in, we have to create our own
         # SecurityManager to be able to access the Catalog
         sm = getSecurityManager()




More information about the Erp5-report mailing list