Commit 43a60ed7 authored by Martin Mareš's avatar Martin Mareš
Browse files

Allow PDF 2.x

parent 3110863b
......@@ -386,7 +386,7 @@ def validate_attachment(form, field):
def is_pdf(f):
f.seek(0)
header = f.read(9)
return len(header) == 9 and header[:7] == b'%PDF-1.'
return len(header) == 9 and (header[:7] == b'%PDF-1.' or header[:7] == b'%PDF-2.')
def is_utf8(f):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment