#14354: Check password is not None in User.check_password
-------------------------------------+--------------------------------------
Reporter: berryp | Owner: laurentluce
Status: assigned | Milestone: 1.3
Component: Authentication | Version: 1.2
Resolution: | Keywords:
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------------+--------------------------------------
Comment (by laurentluce):
Reformat the description.
I attached a patch with the following changes:
- in set_password(), check for raw_password and if None or , call
set_unusable_password(), otherwise same as before[[BR]]
- in has_usable_password(), return True only if password is not None, or
'!'[[BR]]
- because of the 2 changes above, we can simplify a bit create_user() by
just calling set_password() for all cases. No need to test password and
branch out.[[BR]]
- basic.py tests are now unittests and not doctests
--
Ticket URL: <http://code.djangoproject.com/ticket/14354#comment:5>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.