]> git.ipfire.org Git - thirdparty/patchwork.git/commit
parser: catch failures in decoding headers
authorDaniel Axtens <dja@axtens.net>
Wed, 28 Jun 2017 07:48:46 +0000 (17:48 +1000)
committerStephen Finucane <stephen@that.guru>
Wed, 28 Jun 2017 20:41:28 +0000 (21:41 +0100)
commit66131ed2ce12c9fe00c294514743480a5ac47bd5
tree79c4882c1255d115aea377ed5492ec2edc4ad002
parent75c2cff7ba29fa7bc92428ade415e26dd4694696
parser: catch failures in decoding headers

Headers can fail to decode:
 - if a part cannot be encoded as ascii
 - if the coding hint names a codec that doesn't exist
 - if there's a null byte in the codec name

Catch these errors.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reviewed-by: Stephen Finucane <stephen@that.guru>
patchwork/parser.py