Opened 7 years ago

Closed 4 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/ 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 Changed 7 years ago by Karen Tracey

Description: modified (diff)
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

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

comment:2 Changed 7 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

comment:3 Changed 6 years ago by Peter Baumgartner

Severity: Normal
Type: Bug

comment:4 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:5 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:6 Changed 4 years ago by steph

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