Opened 15 years ago
Last modified 12 years ago
#11679 closed
FormWizard: security_hash() has issues with Safari leaving in \r\n — at Version 1
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.formtools | Version: | 1.0 |
Severity: | Normal | Keywords: | FormWizard |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
In v1.0.3: The latest Safari is passing in \r\n within the text fields. These are blowing up the security_hash() call when on Step 2 of a multiple step FormWizard.
Try the test:
f1 = TestForm({'name': 'joe', 'bio': 'Nothing\r\nnotable.'})
Similar to fix r10752; changing django/contrib/formtools/utils.py as follows works around the issue:
25: if isinstance(value, basestring): 26: value = value.strip() 27+ value = value.replace('\r', ' ') 28+ value = value.replace('\n', ' ')
Note:
See TracTickets
for help on using tickets.
Fixed description: reference is to a changeset, not a ticket.