X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=mimedecode.py;h=d239a1fe2234e332cb78b7d96387c687c98c6e70;hb=f0f753ad009f6bd7089e0d6d3fce3ffd111734f5;hp=7d96a3d50a3eacb030265ae0846e7509843793d6;hpb=2478edc3fbaac6f9aa62f17af1e18c0b7e4510f0;p=mimedecode.git diff --git a/mimedecode.py b/mimedecode.py index 7d96a3d..d239a1f 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -394,6 +394,8 @@ def decode_multipart(msg): if boundary: output("%s--%s--%s" % (os.linesep, boundary, os.linesep)) return + elif content_type in g.error_mask: + raise ValueError, "content type %s prohibited" % ctype output_headers(msg)