Commit 622067d7 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'fix/smime_signed_mail_not_overwrite_content_disposition_if_empty' into 'master'

Fix SMIME signed email sending, do not overwrite Content-Disposition

See merge request gitlab-org/gitlab!76233
parents 1de1e32b 8dc47e60
......@@ -45,7 +45,6 @@ module Gitlab
end
def overwrite_headers(message, signed_email)
message.content_disposition = signed_email.content_disposition
message.content_transfer_encoding = signed_email.content_transfer_encoding
message.content_type = signed_email.content_type
end
......
......@@ -50,6 +50,7 @@ RSpec.describe Gitlab::Email::Hook::SmimeSignatureInterceptor do
expect(mail.header['To'].value).to eq('test@example.com')
expect(mail.header['From'].value).to eq('info@example.com')
expect(mail.header['Content-Type'].value).to match('multipart/signed').and match('protocol="application/x-pkcs7-signature"')
expect(mail.header.include?('Content-Disposition')).to eq(false)
# verify signature and obtain pkcs7 encoded content
p7enc = Gitlab::Email::Smime::Signer.verify_signature(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment