mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-11-03 19:08:50 +03:00
OpenSSL::verify() called openssl_pkcs7_verify with PKCS7_NOSIGS, which skips the signature check, and returned success whenever that call did. Any well-formed signed message therefore came back as success: true, including one whose content had been changed after signing, and the client shows that as a good signature (Message.js smimeSigned). Applies to the message view, the explicit verify action and signed content inside decrypted mail. The call is also how the content of an opaque signed message is extracted for display, so it stays as it is for that, and a second openssl_pkcs7_verify without PKCS7_NOSIGS now decides success and does not throw on failure. A message with a broken signature remains readable but is no longer reported as signed. PKCS7_NOVERIFY is kept on purpose: the signer certificate is not checked against a CA, so success means the content is what the certificate holder signed, not that the certificate is trusted; the comment says so. test/smime-verify.php signs detached and opaque messages with a throwaway key, checks the intact ones verify, and that altering one byte of signed content flips success to false while the content stays readable. Before this change the altered detached message was reported as validly signed. |
||
|---|---|---|
| .. | ||
| carddav.php | ||
| header-injection.php | ||
| sasl.php | ||
| smime-verify.php | ||
| sso.php | ||