mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #6918: Adjusted the test in r12683 to more specifically look for what it is testing so it doesn't get thrown off by other minor differences in email ouput (hopefully). Also put a docstring back in its place.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12688 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -55,8 +55,8 @@ def make_msgid(idstring=None):
|
||||
|
||||
|
||||
def forbid_multi_line_headers(name, val, encoding):
|
||||
encoding = encoding or settings.DEFAULT_CHARSET
|
||||
"""Forbids multi-line headers, to prevent header injection."""
|
||||
encoding = encoding or settings.DEFAULT_CHARSET
|
||||
val = force_unicode(val)
|
||||
if '\n' in val or '\r' in val:
|
||||
raise BadHeaderError("Header values can't contain newlines (got %r for header %r)" % (val, name))
|
||||
|
||||
Reference in New Issue
Block a user