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-15 04:54:30 +08:00
|
|
|
"""
|
|
|
|
This is a URLconf to be loaded by tests.py. Add any URLs needed for tests only.
|
|
|
|
"""
|
|
|
|
|
|
|
|
from django.conf.urls.defaults import *
|
2011-06-01 21:47:00 +08:00
|
|
|
from django.contrib.formtools.tests import TestFormPreview, TestWizardClass
|
|
|
|
|
|
|
|
from forms import (ContactWizard, Page1, Page2, Page3, TestForm,
|
|
|
|
WizardPageOneForm, WizardPageTwoForm, WizardPageThreeForm)
|
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-15 04:54:30 +08:00
|
|
|
|
|
|
|
urlpatterns = patterns('',
|
2011-06-01 21:47:00 +08:00
|
|
|
url(r'^preview/', TestFormPreview(TestForm)),
|
|
|
|
url(r'^wizard1/$', TestWizardClass(
|
|
|
|
[WizardPageOneForm, WizardPageTwoForm, WizardPageThreeForm])),
|
|
|
|
url(r'^wizard2/$', ContactWizard([Page1, Page2, Page3])),
|
|
|
|
)
|