Opened 15 years ago

Closed 11 years ago

#11679 closed Bug (invalid)

FormWizard: security_hash() has issues with Safari leaving in \r\n

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

Description (last modified by Karen Tracey)

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', ' ')

Change History (6)

comment:1 by Karen Tracey, 15 years ago

Description: modified (diff)

Fixed description: reference is to a changeset, not a ticket.

comment:2 by Russell Keith-Magee, 14 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Peter Baumgartner, 13 years ago

Severity: Normal
Type: Bug

comment:4 by Aymeric Augustin, 12 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:5 by Aymeric Augustin, 12 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:6 by steph, 11 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top