Skip to content

Commit 867f0e4

Browse files
author
chaoflow
committed
safer string comparison
git-svn-id: https://svn.plone.org/svn/collective/bda.ldap/trunk@121989 db7f04ef-aaf3-0310-a811-c281ed44c4ad
1 parent a83ff92 commit 867f0e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bda/ldap/users.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def authenticate(self, id=None, login=None, pw=None):
9696
if pw is None:
9797
raise ValueError(u"You need to specify a password")
9898
if login:
99-
if self._login_attr is self._key_attr:
99+
if self._login_attr == self._key_attr:
100100
id = login
101101
else:
102102
id = self.idbylogin(login)

0 commit comments

Comments
 (0)