django1/django/contrib/auth
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
..
fixtures Refs #7521 -- Re-reverted [7716] (originally reverted in [7726]), now modified to use the new TestCase urlpattern framework. 2008-06-30 13:11:12 +00:00
handlers Small change to modpython auth handler to support Apache 2.2 2007-09-15 18:36:31 +00:00
management 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
tests Fixed #14445 - Use HMAC and constant-time comparison functions where needed. 2010-10-14 20:54:30 +00:00
__init__.py Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code. 2010-10-11 12:20:07 +00:00
admin.py Fixed #12804 - regression with decorating admin views. 2010-02-09 15:02:39 +00:00
backends.py Fixed #12164 -- Removed the Python 2.3 compatibility imports and workarounds. Thanks to timo and claudep for the patch. 2010-05-04 14:00:30 +00:00
context_processors.py Fixed #12066 - Moved auth context processor from core to the auth app. Thanks, Rob Hudson. 2010-02-21 23:40:47 +00:00
create_superuser.py Fixed #7392 -- Corrected a typo in the backwards-compatibility layer to the new createsuperuser command. 2008-06-08 08:45:14 +00:00
decorators.py Added login_url argument to login_required decorator. Thanks mhlakhani and ericflo for the report and patch. 2010-09-10 19:38:57 +00:00
forms.py Fixed #14386, #8960, #10235, #10909, #10608, #13845, #14377 - standardize Site/RequestSite usage in various places. 2010-10-04 14:20:47 +00:00
middleware.py Fixed #11509 -- Modified usage of "Web" to match our style guide in various documentation, comments and code. Thanks to timo and Simon Meers for the work on the patch. 2010-10-09 08:12:50 +00:00
models.py Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code. 2010-10-11 12:20:07 +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 Tests for password change process. Thanks, Mike Richardson. Fixed #8402. 2008-08-23 18:20:49 +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