projects
/
mirror
/
userdir-ldap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d339295
)
Handle capital {CRYPT} in userpasswd
author
Peter Palfrader
<peter@palfrader.org>
Sat, 21 May 2011 14:50:21 +0000
(16:50 +0200)
committer
Peter Palfrader
<peter@palfrader.org>
Sat, 21 May 2011 14:50:21 +0000
(16:50 +0200)
UDLdap.py
patch
|
blob
|
history
diff --git
a/UDLdap.py
b/UDLdap.py
index
acc645f
..
b546112
100644
(file)
--- a/
UDLdap.py
+++ b/
UDLdap.py
@@
-57,15
+57,15
@@
class Account:
def pw_active(self):
if not 'userPassword' in self:
return False
def pw_active(self):
if not 'userPassword' in self:
return False
- if self['userPassword']
== '{crypt
}*LK*':
+ if self['userPassword']
.upper() == '{CRYPT
}*LK*':
return False
return False
- if self['userPassword'].
startswith("{crypt
}!"):
+ if self['userPassword'].
upper().startswith("{CRYPT
}!"):
return False
return True
def get_password(self):
p = self['userPassword']
return False
return True
def get_password(self):
p = self['userPassword']
- if not p.
startswith('{crypt
}') or len(p) > 50:
+ if not p.
upper().startswith('{CRYPT
}') or len(p) > 50:
return p
else:
return p[7:]
return p
else:
return p[7:]