summaryrefslogtreecommitdiff
path: root/django/contrib/formtools/preview.py
AgeCommit message (Collapse)Author
2014-11-26Fixed #23677 -- Removed contrib.formtoolsTim Graham
2013-11-02Fixed all E261 warningscoagulant
2013-10-31Started attackign the next flake8 violationAlex Gaynor
2013-10-18Fixed #21268 -- Fixed E303 pep8 warningsAlasdair Nicol
2013-08-04Fixed a number of lint warnings, particularly around unused variables.Alex Gaynor
2011-07-13Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for ↵Jannis Leidel
the work on the patch and Alex for reviewing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-30Updated FormPreview to use form_hmac rather than the old security_hash functionLuke Plant
This ought to have been done in [14218], but although the FormPreview class was modified, and some tests were added, the crucial lines of code were not changed (the 'FormPreview.security_hash' method), and tests for the new behaviour were not added. So it is being changed now. Unlike some of the other code in that changeset, this does not need to have a compatibility fallback to cope with existing hashes, because the consequence of a failed hash is minimal - the user is re-presented with the preview stage of the form, which will then have a correct hash. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28Removed a bunch of Python 2.4 workarounds now that we don't support it. Refs ↵Adrian Holovaty
#15702 -- thanks to jonash for the patch. Splitting this over muliple commits to make it more manageable. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15926 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21Few improvements to FormPreview, thanks Andy!Honza Král
This commit adds several new hooks in backwards-compatible way: * get_initial to specify initial data based on request * get_auto_id to enable different AUTO_ID values * get_context for overriding and extending default context contents git-svn-id: http://code.djangoproject.com/svn/django/trunk@14659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-14Fixed #14445 - Use HMAC and constant-time comparison functions where needed.Luke Plant
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-02-27Fixed #12981 -- Removed some stray tabs. Thanks to loewis for the report.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12614 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-22Fixed #9147 -- Added `FormPreview.process_preview` customization hook. ↵Justin Bronn
Thanks, bthomas and thalin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26Fixed #6209: handle `BooleanField`s in `FormPreview` and `FormWizard`. In ↵Jacob Kaplan-Moss
the process, broke the the security hash calculation out to a helper function. Thanks to mcroydon and rajeshdhawan. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8597 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-02Fixed #7919 -- md5 and sha modules are deprecated since Python 2.5, use ↵Gary Wilson Jr
hashlib module when available. Patch from Karen Tracey. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-18Fixed corner-case bug in formtools wizard.py and preview.py, in case of a ↵Adrian Holovaty
None value -- thanks, Honza git-svn-id: http://code.djangoproject.com/svn/django/trunk@7277 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-19Fixed #6481 -- Fixed a bunch of import problems (and some whitespace cleanups).Malcolm Tredinnick
Found by Bastian Kleineidam with help from pyflakes. Thanks. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29Fixed a Python 2.3 incompatibility.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6754 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-14Fixed #5432 -- Added docs/form_preview.txt. Thanks, ryankannoAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6247 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-19Fixed #4330 -- Fixed typo when retrieving field names. Patch from Marc Fargas.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5293 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-14Changed the fix from [5231] so that the backwards-incompatibility is made moreMalcolm Tredinnick
obvious and everything still has nice names. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5237 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-30Added missing import to django.contrib.formtools.preview from [4259]. ↵Adrian Holovaty
Thanks, Vadim Macagon git-svn-id: http://code.djangoproject.com/svn/django/trunk@4260 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-29Fixed #3204 -- Changed FormPreview to use RequestContextAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4259 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-05Added django.contrib.formtools, including the forced-preview applicationAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4164 bcc190cf-cafb-0310-a4f2-bffc1f526a37