FreeBSD Bugzilla – Attachment 109429 Details for
Bug 150457
[patch] mail/mutt-devel does not recognize PGP markers with CRLF
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 5.08 KB, created by
Peter.Jeremy
on 2010-09-10 01:00:17 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Peter.Jeremy
Created:
2010-09-10 01:00:17 UTC
Size:
5.08 KB
patch
obsolete
>--- crypt-gpgme.c~ 2010-09-10 07:41:33.584316201 +1000 >+++ crypt-gpgme.c 2010-09-10 08:22:32.948976728 +1000 >@@ -2003,12 +2003,14 @@ > { > if (!mutt_strncmp ("-----BEGIN PGP ", buf, 15)) > { >- if (!mutt_strcmp ("MESSAGE-----\n", buf + 15)) >+ if (!mutt_strcmp ("MESSAGE-----\n", buf + 15) || >+ !mutt_strcmp ("MESSAGE-----\r\n", buf + 15)) > { > enc = 1; > break; > } >- else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15)) >+ else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) || >+ !mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15)) > { > sgn = 1; > break; >@@ -2128,7 +2130,8 @@ > continue; > } > >- if (!mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n")) >+ if (!mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") || >+ !mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\r\n")) > break; > > if (armor_header) >@@ -2196,14 +2199,17 @@ > clearsign = 0; > start_pos = last_pos; > >- if (!mutt_strcmp ("MESSAGE-----\n", buf + 15)) >+ if (!mutt_strcmp ("MESSAGE-----\n", buf + 15) || >+ !mutt_strcmp ("MESSAGE-----\r\n", buf + 15)) > needpass = 1; >- else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15)) >+ else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) || >+ !mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15)) > { > clearsign = 1; > needpass = 0; > } >- else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15)) >+ else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) || >+ !mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15)) > { > needpass = 0; > pgp_keyblock = 1; >--- pgp.c~ 2009-05-31 03:20:08.000000000 +1000 >+++ pgp.c 2010-09-10 08:27:40.317064142 +1000 >@@ -219,7 +219,8 @@ > continue; > } > >- if (mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0) >+ if (mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0 || >+ mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\r\n") == 0) > break; > > if (armor_header) >@@ -287,14 +288,17 @@ > clearsign = 0; > start_pos = last_pos; > >- if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0) >+ if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0 || >+ mutt_strcmp ("MESSAGE-----\r\n", buf + 15) == 0) > needpass = 1; >- else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0) >+ else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0 || >+ mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15) == 0) > { > clearsign = 1; > needpass = 0; > } >- else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15)) >+ else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) || >+ !mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15)) > { > needpass = 0; > pgp_keyblock = 1; >@@ -327,10 +331,14 @@ > > fputs (buf, tmpfp); > >- if ((needpass && mutt_strcmp ("-----END PGP MESSAGE-----\n", buf) == 0) || >- (!needpass >- && (mutt_strcmp ("-----END PGP SIGNATURE-----\n", buf) == 0 >- || mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\n",buf) == 0))) >+ if ((needpass && >+ (mutt_strcmp ("-----END PGP MESSAGE-----\n", buf) == 0 || >+ mutt_strcmp ("-----END PGP MESSAGE-----\r\n", buf) == 0)) || >+ (!needpass && >+ (mutt_strcmp ("-----END PGP SIGNATURE-----\n", buf) == 0 || >+ mutt_strcmp ("-----END PGP SIGNATURE-----\r\n", buf) == 0 || >+ mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\n",buf) == 0 || >+ mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\r\n",buf) == 0))) > break; > /* remember optional Charset: armor header as defined by RfC4880 */ > if (mutt_strncmp ("Charset: ", buf, 9) == 0) >@@ -554,11 +562,14 @@ > { > if (mutt_strncmp ("-----BEGIN PGP ", buf, 15) == 0) > { >- if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0) >+ if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0 || >+ mutt_strcmp ("MESSAGE-----\r\n", buf + 15) == 0) > enc = 1; >- else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0) >+ else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0 || >+ mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15) == 0) > sgn = 1; >- else if (mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0) >+ else if (mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0 || >+ mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15) == 0) > key = 1; > } > } >@@ -1067,9 +1078,11 @@ > */ > while (fgets (buffer, sizeof (buffer) - 1, pgpout) != NULL) > { >- if (mutt_strcmp ("-----BEGIN PGP MESSAGE-----\n", buffer) == 0) >+ if (mutt_strcmp ("-----BEGIN PGP MESSAGE-----\n", buffer) == 0 || >+ mutt_strcmp ("-----BEGIN PGP MESSAGE-----\r\n", buffer) == 0) > fputs ("-----BEGIN PGP SIGNATURE-----\n", fp); >- else if (mutt_strcmp("-----END PGP MESSAGE-----\n", buffer) == 0) >+ else if (mutt_strcmp("-----END PGP MESSAGE-----\n", buffer) == 0 || >+ mutt_strcmp("-----END PGP MESSAGE-----\r\n", buffer) == 0) > fputs ("-----END PGP SIGNATURE-----\n", fp); > else > fputs (buffer, fp);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 150457
: 109429