mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-02 21:12:02 +08:00
#89 Bugfix mime and signatures detection
This commit is contained in:
parent
aa276c04c0
commit
5514264914
1 changed files with 2 additions and 2 deletions
|
@ -62,7 +62,7 @@ const
|
||||||
mimeToMessage = (data, message) => {
|
mimeToMessage = (data, message) => {
|
||||||
// TODO: Check multipart/signed application/pgp-signature application/pgp-keys
|
// TODO: Check multipart/signed application/pgp-signature application/pgp-keys
|
||||||
const headers = data.split(/\r?\n\r?\n/)[0];
|
const headers = data.split(/\r?\n\r?\n/)[0];
|
||||||
if (/Content-Type:.+; boundary=/.test(headers)) {
|
if (/Content-Type:[\s\S]*?;\s*boundary=/.test(headers)) {
|
||||||
// https://github.com/postalsys/postal-mime
|
// https://github.com/postalsys/postal-mime
|
||||||
(new PostalMime).parse(data).then(result => {
|
(new PostalMime).parse(data).then(result => {
|
||||||
// TODO: multipart/signed
|
// TODO: multipart/signed
|
||||||
|
@ -634,7 +634,7 @@ export class MailMessageView extends AbstractViewRight {
|
||||||
PgpUserStore.decrypt(oMessage).then(result => {
|
PgpUserStore.decrypt(oMessage).then(result => {
|
||||||
if (result && result.data) {
|
if (result && result.data) {
|
||||||
mimeToMessage(result.data, oMessage);
|
mimeToMessage(result.data, oMessage);
|
||||||
if (result.signatures) {
|
if (result.signatures && result.signatures.length) {
|
||||||
oMessage.pgpSigned(true);
|
oMessage.pgpSigned(true);
|
||||||
oMessage.pgpVerified({
|
oMessage.pgpVerified({
|
||||||
signatures: result.signatures,
|
signatures: result.signatures,
|
||||||
|
|
Loading…
Reference in a new issue