Merge pull request #2039 from gocowim/fix_autocrypt_compliance

FIX non-compliant Autocrypt Header
This commit is contained in:
Maarten 2026-10-22 12:50:26 +02:00 • committed by GitHub
commit 85b142f559
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1634,7 +1634,9 @@ export class ComposePopupView extends AbstractViewPopup {
Object.entries(PgpUserStore.getPublicKeyOfEmails(recipients) || {}).forEach(([k,v]) =>
params.autocrypt.push({
addr: k,
keydata: v.replace(/-----(BEGIN|END) PGP PUBLIC KEY BLOCK-----/g, '').trim()
keydata: v
.replace(/-----(BEGIN|END) PGP PUBLIC KEY BLOCK-----/g, '')
.replace(/\s+/g, '') // Single base64 string, let the server do compliance formatting
})
);
for (let i = 0; i < encryptOptions.length; ++i) {