Changeset 3646:2b649fd03f1e
- Timestamp:
- 2004-04-12 13:33:33 (5 years ago)
- Author:
- Thomas Roessler <roessler@…>
- Branch:
- HEAD
- Message:
-
A belated fix for #1808 (Debian #233106): Make sure
check-traditional-pgp doesn't leave the pager context unnecessarily.
This makes message-hooks like this one safe:
message-hook '!(~g|~G) ~b"-----BEGIN\ PGP\ (SIGNED\ )?MESSAGE"' \
"exec check-traditional-pgp"
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r3549
|
r3646
|
|
| 942 | 942 | int rv = 0; |
| 943 | 943 | |
| | 944 | h->security |= PGP_TRADITIONAL_CHECKED; |
| | 945 | |
| 944 | 946 | mutt_parse_mime_message (Context, h); |
| 945 | 947 | if ((msg = mx_open_message (Context, h->msgno)) == NULL) |
| … |
… |
|
| 960 | 962 | int i; |
| 961 | 963 | int rv = 0; |
| 962 | | if (h) |
| | 964 | if (h && !(h->security & PGP_TRADITIONAL_CHECKED)) |
| 963 | 965 | rv = _mutt_check_traditional_pgp (h, redraw); |
| 964 | 966 | else |
| 965 | 967 | { |
| 966 | 968 | for (i = 0; i < Context->vcount; i++) |
| 967 | | if (Context->hdrs[Context->v2r[i]]->tagged) |
| | 969 | if (Context->hdrs[Context->v2r[i]]->tagged && !(h->security & PGP_TRADITIONAL_CHECKED)) |
| 968 | 970 | rv = _mutt_check_traditional_pgp (Context->hdrs[Context->v2r[i]], redraw) |
| 969 | 971 | || rv; |
-
|
r3453
|
r3646
|
|
| 1877 | 1877 | CHECK_MSGCOUNT; |
| 1878 | 1878 | CHECK_VISIBLE; |
| 1879 | | mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); |
| | 1879 | if (tag || !(CURHDR->security & PGP_TRADITIONAL_CHECKED)) |
| | 1880 | mutt_check_traditional_pgp (tag ? NULL : CURHDR, &menu->redraw); |
| | 1881 | |
| 1880 | 1882 | if (menu->menu == MENU_PAGER) |
| 1881 | 1883 | { |
-
|
r3633
|
r3646
|
|
| 642 | 642 | typedef struct header |
| 643 | 643 | { |
| 644 | | unsigned int security : 9; /* bit 0-6: flags, bit 7,8: application. |
| | 644 | unsigned int security : 10; /* bit 0-6: flags, bit 7,8: application. |
| 645 | 645 | see: crypt.h pgplib.h, smime.h */ |
| 646 | 646 | |
-
|
r3549
|
r3646
|
|
| 42 | 42 | #define APPLICATION_SMIME (1 << 8) |
| 43 | 43 | |
| | 44 | #define PGP_TRADITIONAL_CHECKED (1 << 9) |
| | 45 | |
| 44 | 46 | #define PGPENCRYPT (APPLICATION_PGP | ENCRYPT) |
| 45 | 47 | #define PGPSIGN (APPLICATION_PGP | SIGN) |
-
|
r3537
|
r3646
|
|
| 2174 | 2174 | redraw = REDRAW_FULL; |
| 2175 | 2175 | break; |
| | 2176 | |
| | 2177 | case OP_CHECK_TRADITIONAL: |
| | 2178 | CHECK_MODE (IsHeader (extra)); |
| | 2179 | if (!(WithCrypto & APPLICATION_PGP)) |
| | 2180 | break; |
| | 2181 | if (!(extra->hdr->security & PGP_TRADITIONAL_CHECKED)) |
| | 2182 | { |
| | 2183 | ch = -1; |
| | 2184 | rc = OP_CHECK_TRADITIONAL; |
| | 2185 | } |
| | 2186 | break; |
| 2176 | 2187 | |
| 2177 | 2188 | case OP_CREATE_ALIAS: |
-
|
r3495
|
r3646
|
|
| 817 | 817 | /* functions which are passed through from the pager */ |
| 818 | 818 | case OP_CHECK_TRADITIONAL: |
| 819 | | if (!(WithCrypto & APPLICATION_PGP)) |
| | 819 | if (!(WithCrypto & APPLICATION_PGP) || (hdr && hdr->security & PGP_TRADITIONAL_CHECKED)) |
| 820 | 820 | { |
| 821 | 821 | op = OP_NULL; |