Also picked up with afl-fuzz.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reviewed-by: Stephen Finucane <stephen@that.guru>
if not email:
raise ValueError("Invalid 'From' header")
- email = email.strip()
+ email = email.strip()[:255]
if name is not None:
- name = name.strip()
+ name = name.strip()[:255]
try:
person = Person.objects.get(email__iexact=email)
self._test_patch('year-out-of-range.mbox')
self._test_patch('date-oserror.mbox')
- def test_msgid(self):
+ def test_length_for_db(self):
self._test_patch('msgid-len.mbox')
self._test_patch('msgid-len2.mbox')
+ self._test_patch('email-len.mbox')
+ self._test_patch('name-len.mbox')
def test_hdr(self):
self._test_patch('refshdr.mbox')