django/tests/regressiontests
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
..
admin_changelist Fixed #13599 -- No longer embed hidden `<td>` elements in `ChangeList` that cause improper rendering when `list_editable` is enabled; refactored `admin_changelist` tests. Thanks, skevy for bug report and patch. 2010-09-11 03:01:07 +00:00
admin_inlines Migrated admin_inlines doctest. Thanks to Sebastian Hillig. 2010-09-27 15:11:03 +00:00
admin_ordering Migrated admin_ordering doctests. Thanks to Sebastian Hillig. 2010-09-27 15:11:29 +00:00
admin_registration Migrated admin_registration doctests. Thanks to Sebastian Hillig. 2010-09-27 15:11:55 +00:00
admin_scripts Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
admin_util Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
admin_validation Migrated admin_validation doctests. Thanks to Sebastian Hillig. 2010-09-27 15:12:22 +00:00
admin_views Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
admin_widgets Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
aggregation_regress Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
app_loading Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
backends Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
bash_completion Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
bug639 Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
bug8245 Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
builtin_server Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
cache Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
comment_tests Fixed #14445 - Use HMAC and constant-time comparison functions where needed. 2010-10-14 20:54:30 +00:00
conditional_processing Fixed #10681 -- Work around (by ignoring) invalid ETag headers. 2009-04-03 06:59:34 +00:00
context_processors Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code. 2010-10-11 12:20:07 +00:00
csrf_tests Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code. 2010-10-11 12:20:07 +00:00
custom_columns_regress 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
custom_managers_regress Migrated the custom_managers_regress doctests. Thanks to Paul McMillan. 2010-09-26 09:55:41 +00:00
datatypes Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
db_typecasts Refs #2333 - Modified runtests script to use new testing framework. Migrated existing tests to use Django testing framework. All the 'othertests' have been migrated into 'regressiontests', and converted into doctests/unittests, as appropriate. 2006-08-27 13:59:47 +00:00
decorators Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
defaultfilters Migrated defaultfilters doctests. Thanks to Stephan Jaekel. 2010-09-28 08:19:04 +00:00
defer_regress Fixed #5416 -- Added TestCase.assertNumQueries, which tests that a given function executes the correct number of queries. 2010-10-12 03:33:19 +00:00
delete_regress Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
dispatch Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
expressions_regress Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
extra_regress Migrated extra_regress doctests. Thanks to Stephan Jaekel. 2010-09-28 13:42:09 +00:00
file_storage Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
file_uploads Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
fixtures_regress Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
forms Fixed #5416 -- Added TestCase.assertNumQueries, which tests that a given function executes the correct number of queries. 2010-10-12 03:33:19 +00:00
formwizard Fixed #9473: FormWizard now works with NullBooleanFields. As a bonus, we now have the beginnings of a test suite for FormWizard. Thanks, Keith Bussell. 2009-04-01 14:13:43 +00:00
generic_inline_admin Fixed #12561. InlineAdmin now respects can_delete=False. Thanks, nessita. 2010-02-23 17:14:50 +00:00
generic_relations_regress Fixed #11535: Corrected SQL generated for queries involving generic relations and ORed Q objects. Thanks to brianglass for report, tobias for fix and test, and Alex for review. 2010-02-10 19:21:52 +00:00
get_or_create_regress Converted get_or_create_regress tests from doctests to unittests. We have always been at war with doctests. 2010-10-12 01:54:19 +00:00
httpwrappers Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
humanize Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
i18n Consolidated i18n commands test with the rest of the i18n tests. 2010-10-10 22:19:01 +00:00
initial_sql_regress Converted initial_sql_regress tests from doctests (sort of...) to unittests. We have always been at war with doctests. 2010-10-12 01:59:28 +00:00
inline_formsets Fixed #14456 -- converted inline_formsets tests from doctests to unittests. We have always been at war with doctests. Thanks to prestontimmons for the patch. 2010-10-14 01:40:20 +00:00
introspection Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
locale/de/LC_MESSAGES Fixed #11384 - Make sure translations in the project directory really override translations in apps as specified in the docs. 2010-02-16 12:17:17 +00:00
localflavor Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
m2m_regress Fixed #14458 -- converted m2m_regress tests from doctests to unittests. We have always been at war with doctests. Thanks to Gabriel Hurley for the patch. 2010-10-14 01:10:57 +00:00
m2m_through_regress Fixed #13799, a test failure on Postgres. Thanks, Alex. 2010-06-23 20:03:41 +00:00
mail Fixed #14301 -- Handle email validation gracefully with email addresses containing non-ASCII characters. Thanks, Andi Albrecht. 2010-10-14 18:37:05 +00:00
managers_regress Fixed #14460 -- converted managers_regress tests from doctests to unittests. We have always been at war with doctests. Patch from Gabriel Hurley. 2010-10-14 01:17:14 +00:00
many_to_one_regress Fixed #14459 -- converted many_to_one_regress tests from doctests to unittests. We have always been at war with doctests. Patch from Gabriel Hurley. 2010-10-14 01:24:34 +00:00
max_lengths Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
middleware Added file missing from r12704. 2010-03-07 20:11:00 +00:00
middleware_exceptions Fixed #13090 -- Corrected handling of errors in middleware when DEBUG=False. Thanks to EroSennin for the report, and Ivan Sagalaev for the patch. 2010-03-12 16:45:29 +00:00
model_fields Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
model_forms_regress Fixed #14119 -- fields_for_model no longer returns all fields when fields parameter is the empty tuple. Thanks alexdutton! 2010-10-13 04:46:33 +00:00
model_formsets_regress Fixed #14119 -- fields_for_model no longer returns all fields when fields parameter is the empty tuple. Thanks alexdutton! 2010-10-13 04:46:33 +00:00
model_inheritance_regress 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
model_inheritance_select_related Converted model_inheritance_select_related tests from doctests to unittests. We have always been at war with doctests. 2010-10-12 02:09:13 +00:00
model_regress Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
modeladmin Fixed #13023 - Removed ambiguity with regard to the max_num option of formsets and as a result of admin inlines. Thanks to Gabriel Hurley for the patch. 2010-03-27 23:03:56 +00:00
multiple_database Fix a couple of typos in test names and descriptions. 2010-09-13 05:08:21 +00:00
null_fk Migrated null_fk doctests. Thanks to Stephan Jaekel. 2010-09-28 08:17:36 +00:00
null_fk_ordering Migrated null_fk_ordering doctests. Thanks to Stephan Jaekel. 2010-09-28 08:17:12 +00:00
null_queries Migrated null_queries doctests. Thanks to Stephan Jaekel. 2010-09-28 08:16:47 +00:00
one_to_one_regress Migrated one_to_one_regress doctests. Thanks to Stephan Jaekel. 2010-09-28 08:16:23 +00:00
pagination_regress Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
queries Fixed #12192 -- Don't execute any DB query when the QS slicing being performed 2010-10-13 23:36:16 +00:00
queryset_pickle Tweak the last two tests from r13013 to test what they are intended to test instead of repeating 3rd to last test. 2010-04-21 18:07:23 +00:00
requests Modified the requests unit tests so that they aren't dependent on dictionary ordering. 2010-09-28 11:54:58 +00:00
reverse_single_related Migrated reverse_single_related doctests. Thanks to Stephan Jaekel. 2010-09-28 07:06:15 +00:00
select_related_onetoone Fixed #5416 -- Added TestCase.assertNumQueries, which tests that a given function executes the correct number of queries. 2010-10-12 03:33:19 +00:00
select_related_regress Migrated select_related_regress doctests. Thanks to Stephan Jaekel. 2010-09-28 07:05:51 +00:00
serializers_regress Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
servers Fixed #14271 -- Use absolute path for admin media tests. Thanks, Alex Gaynor. 2010-09-26 20:55:58 +00:00
settings_tests Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
signals_regress Migrated signals_regress doctests. Thanks to Stephan Jaekel. 2010-09-27 15:18:03 +00:00
special_headers Added some missing __init__.py files to two tests 2010-01-10 17:49:41 +00:00
string_lookup Migrated string_lookup doctests. Thanks to Stephan Jaekel. 2010-09-27 15:17:36 +00:00
syndication Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code. 2010-10-11 12:20:07 +00:00
templates Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
test_client_regress Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
test_runner Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
test_utils Fixed #5416 -- Added TestCase.assertNumQueries, which tests that a given function executes the correct number of queries. 2010-10-12 03:33:19 +00:00
text Migrated text doctests. Thanks to Stephan Jaekel. 2010-09-27 15:17:08 +00:00
urlpatterns_reverse Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
utils Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. 2010-10-11 12:55:17 +00:00
views Fixed #13897 -- Added tests for pagination feature of the generic object_list view. Thanks, d0ugal and SmileyChris. 2010-10-01 02:01:20 +00:00
__init__.py Added regressions tests to ensure that one-to-one and many-to-many fields 2006-06-20 05:29:19 +00:00