mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
doubly encode the CSR in base64 (#9532)
When the file is provided as an attachment to the Sails helper, it gets decoded, since we need for the signed CSR to be delivered in base64 format, we doubly encode the contents before sending the email.
This commit is contained in:
parent
102354be8a
commit
090e9a17c3
1 changed files with 5 additions and 1 deletions
6
website/api/controllers/deliver-apple-csr.js
vendored
6
website/api/controllers/deliver-apple-csr.js
vendored
|
|
@ -139,7 +139,11 @@ module.exports = {
|
|||
template: 'email-signed-csr-for-apns',
|
||||
templateData: {},
|
||||
attachments: [{
|
||||
contentBytes: generateCertificateResult.request,
|
||||
// When the file is provided as an attachment to the Sails helper, it
|
||||
// gets decoded, since we need for the signed CSR to be delivered in
|
||||
// base64 format, we doubly encode the contents before sending the
|
||||
// email.
|
||||
contentBytes: Buffer.from(generateCertificateResult.request).toString('base64'),
|
||||
name: 'apple-apns-request.txt',
|
||||
type: 'text/plain',
|
||||
}],
|
||||
|
|
|
|||
Loading…
Reference in a new issue