django1/django/contrib/comments
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/comments Fixed paste-o in [13855] 2010-09-14 21:40:23 +00:00
templatetags Fixed #12053 - form examples don't validate according to w3c 2010-01-04 21:55:52 +00:00
views Changed the comments post view code to avoid raising an exception if handed invalid data for the object pk. Thanks to Leo for the test. 2010-03-16 22:37:45 +00:00
__init__.py Fixed #8193: all dynamic imports in Django are now done correctly. I know this because Brett Cannon borrowed the time machine and brought Python 2.7's '`importlib` back for inclusion in Django. Thanks for the patch-from-the-future, Brett! 2009-03-18 16:55:59 +00:00
admin.py Fixed #12940 -- Modified some admin actions in contrib.comments to use ungettext in order to support Russian (and similar) pluralization rules. Thanks to void for the report and patch. 2010-03-12 15:32:06 +00:00
feeds.py Fixed #6188, #6304, #6618, #6969, #8758, #8989, #10334, #11069, #11973 and #12403 -- Modified the syndication framework to use class-based views. Thanks to Ben Firshman for his work on this patch. 2010-01-28 13:46:18 +00:00
forms.py Fixed #14445 - Use HMAC and constant-time comparison functions where needed. 2010-10-14 20:54:30 +00:00
managers.py A few small fixes to django.contrib.comments (Comment.get_as_text for non-authenticated users; references to Comment.permalink; unused imports). Fixes #9143, #9429, and 9439. Thanks, Thejaswi Puthraya. 2009-01-12 17:27:41 +00:00
models.py Fixed #1142 -- Added multiple database support. 2009-12-22 15:18:51 +00:00
moderation.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
signals.py Updated comment signals to provide enough information to actually act on. This was uncovered when working on the documentation, which'll be committed shortly. 2008-08-26 18:53:52 +00:00
urls.py Fixed #14412 -- Pointed contrib.comments comments-url-redirect URLpattern at the actual view instead of the deprecated view. Thanks, subsume 2010-10-06 22:56:52 +00:00