Details
- Reviewers
machniak - Group Reviewers
Syncroton Developers - Maniphest Tasks
- T1229: Fix S/MIME handling in syncroton
- Commits
- rS15d191f3ca27: Fix S/MIME handling in syncroton (T1229)
Diff Detail
- Repository
- rS syncroton
- Branch
- master
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 3494 Build 3469: arc lint + arc unit
Event Timeline
Please, fix indentation (use spaces).
lib/kolab_sync_data_email.php | ||
---|---|---|
322–330 | To exclude PGP messages this check need to be a little bit more specific. See https://github.com/roundcube/roundcubemail/blob/master/plugins/enigma/lib/enigma_engine.php#L499 |
I just found out that the test for smime-signatures does not work as expected: $struct is always null and so a signed only mail is not recognized.
For me there a two possibilities to fix this:
- Change test so it loops over all attachments and parts and checks if at least one has a mimetype of 'application/pkcs7-signature' then use the 'IPM.Note.SMIME.MultipartSigned' messageClass
- Implement a new method has_smime_sig in rcube_message class analogue to has_html_part() and check the result in the test.
Solution one looks like a good thing because it is completely "local" change but also may cause the check for smime signatures to be implemented multiple times if anybody else needs it. Solution feels more like the "right" way because ultimately the message (represented by the rcube_message class) should "know" it's features. Also the rcube_message class would be the central point to implement this only once for everyone to consume.
Please advise how to proceed and which solution you would prefer.
According to RFC5751 the signed message has only two parts, i.e. one attachment. So, I think my fix (3ecd3f2df1b1) is good enough.