Skip to content

Commit 9f0f77c

Browse files
committed
Ignore trailing blank lines in form data, since some browsers
strip these inside <input type="hidden"> - Legacy-Id: 923
1 parent 0baf363 commit 9f0f77c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ietf/contrib/wizard.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ def security_hash(self, request, form):
141141
if bf.data is None:
142142
d = ''
143143
else:
144-
d = bf.data
144+
# Hidden inputs strip trailing carraige returns
145+
# so we exclude those from the hash.
146+
d = bf.data.rstrip("\r\n")
145147
data.append((bf.name, d))
146148
data.append(settings.SECRET_KEY)
147149
# Use HIGHEST_PROTOCOL because it's the most efficient. It requires

0 commit comments

Comments
 (0)