-
-
/trunk/reviewboard/accounts/backends.py (Diff revision 1) No need for parens. Also, you can just use [:3].
NIS backend doesn't support MD5 passwords
Review Request #647 — Created Nov. 28, 2008 and submitted
Information | |
---|---|
will_lentz | |
Review Board SVN (deprecated) | |
Reviewers | |
reviewboard | |
The current NIS login code only supports DES passwords. This change adds support for MD5 passwords. (Our NIS server automatically uses MD5 once a password reaches a certain length..)
WI
Change Summary:
OK - I made the suggested changes. For 9/10 of our users the original unmodified code works fine. The tenth user had a long password, so our NIS server uses an MD5 password. The modified code now works for all 10 users, so I don't think this change breaks any existing uses. Also, according to http://en.wikipedia.org/wiki/Crypt_(Unix) only an MD5 password will use a prefix of $1$.
Diff: |
Revision 2 (+6 -1) |
---|
-
-
/trunk/reviewboard/accounts/backends.py (Diff revision 2) Looking at this again, I think we're doing too much work. Wouldn't this make more sense: if original_crypted.startswith("$1$"): salt = original_crypted else: salt = original_crypted[:2]