Opened 9 years ago

Last modified 6 years ago

#11679 closed

FormWizard: security_hash() has issues with Safari leaving in \r\n — at Initial Version

Reported by: al@… 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


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 #10752; changing django/contrib/formtools/ 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', ' ')

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top