Skip to content

Commit 2d15976

Browse files
authored
Merge branch 'master' into issue-5905-add-secure-reply-all-to-gmail-context-menu-live-test
2 parents 88f8adf + cbc1687 commit 2d15976

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

extension/chrome/elements/compose-modules/formatters/encrypted-mail-msg-formatter.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,11 @@ export class EncryptedMsgMailFormatter extends BaseMailFormatter {
181181
{ msgUrl, externalId }: { msgUrl: string; externalId?: string },
182182
signingPrv?: Key
183183
) => {
184-
// encoded as: PGP/MIME-like structure but with attachments as external files due to email size limit (encrypted for pubkeys only)
184+
// encoded as: PGP/MIME-like structure
185185
const msgBody = this.richtext ? { 'text/plain': newMsg.plaintext, 'text/html': newMsg.plainhtml } : { 'text/plain': newMsg.plaintext };
186+
const attachments = await this.view.attachmentsModule.attachment.collectEncryptAttachments(pubs);
186187
// eslint-disable-next-line @typescript-eslint/naming-convention
187-
const pgpMimeNoAttachments = await Mime.encode(msgBody, { Subject: newMsg.subject }, []); // no attachments, attached to email separately
188+
const pgpMimeNoAttachments = await Mime.encode(msgBody, { Subject: newMsg.subject }, attachments);
188189
const { data: pubEncryptedNoAttachments } = await this.encryptDataArmor(Buf.fromUtfStr(pgpMimeNoAttachments), undefined, pubs, signingPrv); // encrypted only for pubs
189190
const emailIntroAndLinkBody = await this.formatPwdEncryptedMsgBodyLink(msgUrl);
190191
return await SendableMsg.createPwdMsg(

test/source/mock/google/strategies/send-message-strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const checkForAbsenceofBase64InAttachments = async (attachments: Attachment[]) =
3030
if (typeof encoding !== 'string') {
3131
throw new HttpClientErr(`Error: Content-Transfer-Encoding isn't present in one of the attachments`);
3232
}
33-
if (!['7bit', 'quoted-printable'].includes(encoding)) {
33+
if (!['7bit', 'quoted-printable', 'base64'].includes(encoding)) {
3434
throw new HttpClientErr(`Error: Unexpected Content-Transfer-Encoding: ${encoding}`);
3535
}
3636
}

0 commit comments

Comments
 (0)