-
-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signed messages only show one attachment, the smime.p7m file itself #223
Comments
After looking at it the pdf is embedded inside that file you have, inside of a base64 stream. In fact, it looks like that stream contains the entire data section of the msg, in some kind of plain text format that I'm not familiar with. That'll take some time to write something that can actually read through that file, unless I can manage to find something that can already do so. Take a look at the data of that attachment and You'll be able to see what I mean, as it's just plain text. Not exactly an error, just something annoying the have to deal with that wasn't known about in the past. |
If you can confirm that the content of a similar message that you sign comes out looking to be the same format as this one, then I can see about properly adding support for it. Probably won't be included in 0.29.0 but may be included in a version of it. Also if you happen to know something in python that can already handle it then let me know and I can see about trying to quickly add support to 0.29.0 |
Thanks for your feedback. I looked through some other similar mails. It seems like it's always the same format.
Maybe this helps? https://tools.ietf.org/doc/python-m2crypto/howto.smime.html |
Not sure yet if the attachments will always be in the right place to appropriately just grab from an index, but I'll take a look at the other stuff when I have a chance, thanks. |
Yeah, this is rather complicated to do as it looks like it will require the use of another dependency, although I would probably only add this one as a soft dependency rather than a hard one. It also looks like decryption of anything that uses the signing would take a long time to implement as it would need to be able to appropriately load your keys. It does look like the email module can at least vaguely parse the mime data, although using it so far has been rather difficult. Trying to get attachments has not yet succeeded in allowing me access to the PDF file, and I honestly don't know why. Still seeing what I can do about that. |
Hello there, It's been a bit and I haven't had much time to look at this until now. I've created a small script that helps handle the single signed attachment for you to test. It contains a function Let me know how it goes. Edit: Quick note, this test file requires the |
Signed attachments are now accessible, although embedded message files in a signed message are not handled (and in theory should be able to actually be directly saved as an MSG file, although I have no examples to work with directly). I'll still be working on further progressing this feature though |
Sorry for the very late response, but somehow I missed the notification on the update... However I've tried with a few more samples (version 0.36.2) and it did seem to work fine in the short test. Going to add it to our test systems in the next few weeks - Thanks! |
Glad to hear things are working. |
Closing as this should be completed. |
Bug Metadata
Describe the bug
When opening a msg-file that is digitally signed and has attachements, the
Message()
object will only show a single attachment which happens to be the signature (smime.p7m). The other attachment(s) are not loaded or shown.What code did you use or can we use to reproduce this error?
Is there a message.msg file you want to share to help us reproduce this?
Traceback
Screenshots
None
Additional context
The text was updated successfully, but these errors were encountered: