Skip to content
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

Empty output on SMIME signed email #96

Open
dlouzan opened this issue Jul 11, 2019 · 3 comments
Open

Empty output on SMIME signed email #96

dlouzan opened this issue Jul 11, 2019 · 3 comments
Labels

Comments

@dlouzan
Copy link

@dlouzan dlouzan commented Jul 11, 2019

Hello, we are working on an MR to add SMIME signing support to gitlab-ce, and we just noticed that rendering of the signed messages doesn't work, we get blank output (attached screenshots). This might be somehow expected since the component doesn't mention any SMIME support.

I'm not sure if this is an issue directly here, or the underlying letter_opener engine (or even maybe directly on rails / gitlab). Since gitlab is not giving me much log info, I'm not sure where to tackle this.

Any guidance is welcome. Thanks!

image

image

@dlouzan
Copy link
Author

@dlouzan dlouzan commented Jul 11, 2019

@fgrehm
Copy link
Owner

@fgrehm fgrehm commented Feb 18, 2020

Hey!

Sorry for the long delay here. Did you figure this one out? If not, mind creating a minimal app that reproduces the problem? I might be able to take a look. Cheers!

@fgrehm fgrehm closed this Feb 18, 2020
@fgrehm fgrehm reopened this Feb 18, 2020
@fgrehm fgrehm added the waiting label Feb 18, 2020
@dlouzan
Copy link
Author

@dlouzan dlouzan commented Feb 18, 2020

Hey @fgrehm thanks for the answer. We implemented the support for S/MIME in Gitlab, though without previews 😅

I actually can provide you a fixture signed email that you can load with the Mail gem and use for your tests, just uploaded one in another MR under https://gitlab.com/gitlab-org/gitlab/-/blob/886e0213ab941ced894dc5de178468094111a5f9/spec/fixtures/emails/valid_reply_signed_smime.eml:

pry(main)> email = Mail.new(File.binread('./spec/fixtures/emails/valid_reply_signed_smime.eml'))
=> #<Mail::Message:70331044711260, Multipart: true, Headers: <Date: Mon, 17 Feb 2020 22:56:47 +0100>, <From: "Louzan Martinez, Diego (ext) (SI BP R&D ZG)" <diego.louzan.ext@siemens.com>>, <To: Administrator / htmltest <dlouzan.dummy+c034670b1623e617e15a3df64223d363@gmail.com>>, <Message-ID: <012E37D9-2A3F-4AC8-B79A-871F42914D86@siemens.com>>, <In-Reply-To: <note_1797@169.254.169.254>>, <References: <reply-c034670b1623e617e15a3df64223d363@169.254.169.254> <issue_451@169.254.169.254> <note_1797@169.254.169.254>>, <Subject: Re: htmltest | test issue (#1)>, <Mime-Version: 1.0>, <Content-Type: multipart/signed; protocol="application/pkcs7-signature";  micalg=sha256;  boundary="B_3664825007_1904734766">, <User-Agent: Microsoft-MacOutlook/10.22.0.200209>, <Thread-Topic: htmltest | test issue (#1)>>

pry(main)> email.multipart?
=> true

pry(main)> email.parts.map(&:content_type)
=> ["multipart/mixed; boundary=B_3664825007_384940722", "application/pkcs7-signature; name=smime.p7s"]

pry(main)> email.parts[0].part.map(&:content_type)
=> ["multipart/alternative; boundary=B_3664825007_1519466360",
 "image/png; name=gitlab_logo.png; x-mac-creator=4F50494D; x-mac-type=504E4766",

pry(main)> email.parts[0].parts[0].parts.map(&:content_type)
=> ["text/plain; charset=UTF-8", "text/html; charset=UTF-8"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants