snappymail/.gitignore
the-djmaze 3776ac6b32 @ZaphodB fix(security): S/MIME verify reported altered messages as validly signed
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.
2026-10-24 11:57:38 +02:00

31 lines
522 B
Text

*.bak
*.old
/api.php
/*.log
/snappymail/v/0.0.0/static/*
/node_modules
/build/local
/build/dist
/build/tmp
/build/docker
/.docker/dev/.cache
/.docker/dev/mail/config
/.docker/dev/nginx/ssl/*
!/.docker/dev/nginx/ssl/.gitempty
/.docker/release/snappymail-*.zip
/dist
/data
/MULTIPLY
/include.php
/issues
.idea/
.env
/public_html
/vendors/knockout/spec
/vendors/openpgp-5
!/vendors/openpgp-5/dist
/vendors/squire2
!/vendors/squire2/dist
/vendors/vanillaqr.js/
/integrations/nextcloud/rainloop
/integrations/owncloud/rainloop