django1/django/contrib/auth/tests
Luke Plant 45c7f427ce Fixed #14445 - Use HMAC and constant-time comparison functions where needed.
All adhoc MAC applications have been updated to use HMAC, using SHA1 to
generate unique keys for each application based on the SECRET_KEY, which is
common practice for this situation. In all cases, backwards compatibility
with existing hashes has been maintained, aiming to phase this out as per
the normal deprecation process. In this way, under most normal
circumstances the old hashes will have expired (e.g. by session expiration
etc.) before they become invalid.

In the case of the messages framework and the cookie backend, which was
already using HMAC, there is the possibility of a backwards incompatibility
if the SECRET_KEY is shorter than the default 50 bytes, but the low
likelihood and low impact meant compatibility code was not worth it.

All known instances where tokens/hashes were compared using simple string
equality, which could potentially open timing based attacks, have also been
fixed using a constant-time comparison function.

There are no known practical attacks against the existing implementations,
so these security improvements will not be backported.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14218 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-14 20:54:30 +00:00
..
templates/registration #14374 -- Added some missing template files to ensure that contrib.auth tests will pass when admin isn't installed. Thanks to henriquebastos for the report and patch. 2010-10-08 13:50:54 +00:00
__init__.py Converted contrib/auth/tokens doctests to unittests. We've always said "no more" to doctests. 2010-10-10 01:06:42 +00:00
auth_backends.py Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code. 2010-10-11 12:20:07 +00:00
basic.py Fixed #14354 -- Normalized the handling of empty/null passwords in contrib.auth. This also updates the createsuperuser command to be more testable, and migrates some auth doctests. Thanks to berryp for the report, and Laurent Luce for the patch. 2010-10-09 03:34:08 +00:00
decorators.py Fixed #14447 -- Modified the auth and sitemaps tests to remove some assumptions about the environment in which the tests are run. Thanks to Gabriel Hurley for the report and patch. 2010-10-12 07:15:47 +00:00
forms.py Fixed #14242 - UserChangeForm subclasses without 'user_permissions' field causes KeyError 2010-09-09 23:31:54 +00:00
models.py Fixed #12776 -- `User.get_profile` now raises `SiteProfileNotAvailable` instead of `AttributeError` in certain circumstances. Thanks, Bruno Renié. 2010-02-23 05:52:37 +00:00
remote_user.py Fixed #6552, #12031 - Make django.core.context_processors.auth lazy to avoid "Vary: Cookie" 2009-10-14 18:09:13 +00:00
tokens.py Fixed #14445 - Use HMAC and constant-time comparison functions where needed. 2010-10-14 20:54:30 +00:00
urls.py Permit custom from-email address in auth forms email. 2010-09-12 22:38:01 +00:00
views.py Fixed #14386, #8960, #10235, #10909, #10608, #13845, #14377 - standardize Site/RequestSite usage in various places. 2010-10-04 14:20:47 +00:00