Limits of Message.convert_pgp intended
Running Message.convert_pgp
successfully requires, that Message.pgp_msg
contains a message of type bytes
and starts with the mysterious GZIP_MAGIC_NUMBER
number. This makes this function usable in very special scenarios. The thing that is weird to me is, that the class performs a lot of validation that doesn't impose this kind of restriction on the content of a PGPMessage object. I don't think it should be possible to generate a Message
object and execute one of its functions, that rely solely on its internal state, which crashes.
Btw. what is the purpose of the GZIP_MAGICK_NUMBER?
Is this behavior intentionally?