[PATCH 2/3] parser: limit emails and names to 255 chars
Daniel Axtens
dja at axtens.net
Sat Jul 1 14:28:43 AEST 2017
Also picked up with afl-fuzz.
Signed-off-by: Daniel Axtens <dja at axtens.net>
---
patchwork/parser.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/patchwork/parser.py b/patchwork/parser.py
index 37603f944150..eab0a7d39863 100644
--- a/patchwork/parser.py
+++ b/patchwork/parser.py
@@ -326,9 +326,9 @@ def find_author(mail):
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)
--
2.11.0
More information about the Patchwork
mailing list