Hi наб, On Sat, May 11, 2024 at 05:18:17PM GMT, наб wrote: > With the parts that remove leading newlines ‒ > > On Sat, May 11, 2024 at 01:27:09PM +0200, Alejandro Colomar wrote: > > @@ -1196,7 +1196,7 @@ int mutt_signed_handler (BODY *a, STATE *s) > > rc = mutt_body_handler (a, s); > > > > if (s->flags & MUTT_DISPLAY && sigcnt) > > - state_attach_puts (_("\n[-- End of signed data --]\n"), s); > > + state_attach_puts (_("[-- End of signed data --]\n"), s); > > > > return rc; > > } > > if (s->flags & MUTT_DISPLAY) > > - { > > - state_puts ("\n", s); > > state_attach_puts (_("[-- End of PGP/MIME encrypted data --]\n"), s); > > - } > > > > mutt_free_body (&tattach); > > /* clear 'Invoking...' message, since there's no error */ > > diff --git a/smime.c b/smime.c > > index 4666cfe3d..e0e7ef4bf 100644 > > --- a/smime.c > > +++ b/smime.c > > @@ -2048,9 +2048,9 @@ static BODY *smime_handle_entity (BODY *m, STATE *s, > > FILE *outFile) > > if (s->flags & MUTT_DISPLAY) > > { > > if (type & ENCRYPT) > > - state_attach_puts (_("\n[-- End of S/MIME encrypted data. --]\n"), > > s); > > + state_attach_puts (_("[-- End of S/MIME encrypted data. --]\n"), s); > > else > > - state_attach_puts (_("\n[-- End of S/MIME signed data. --]\n"), s); > > + state_attach_puts (_("[-- End of S/MIME signed data. --]\n"), s); > > } > > ‒ I'm naturally worried about non-text signed input of, say > "data\ndata\ndata" being rendered as > [-- Start of S/MIME signed data. --] > data > data > data[-- End of S/MIME signed data. --] > which is not what the sender wrote, even more-so than pre-patch. > > If this is somehow protected against (and if it's rendered as expected as > [-- Start of S/MIME signed data. --] > data > data > data > [-- End of S/MIME signed data. --] > ) then this looks good to me.
Hmm, I didn't think of a way to beat that back then, but now I found it. Meh. Please ignore this patch. Thanks for voicing your concerns, наб! Have a lovely night! Alex -- <https://www.alejandro-colomar.es/>
signature.asc
Description: PGP signature