Kevin J. McCarthy wrote: > While working on another patch, I stumbled across some odd behavior. If > you postpone a message marked for encryption (but not for signing), when > you resume the message it overwrites PgpSignAs. > > I notice that ci_send_message() goes through some effort to back up and > restore PgpSignAs, but still this could be unexpected behavior. > > The attached patch "fixes" the problem, but since this seems to be > semi-deliberate I thought I'd ask the list before doing anything about > it. > > I'd appreciate if someone familiar with this would chime in. :-)
After thinking about it, I wonder if the intent was to set pgp_sign_as to the same value as during the postpone, including the empty/default state. S<xxxx> means PgpSignAs was set to "xxxx" during the postpone, while S means PgpSignAs was empty. So it does make sense to clear pgp_sign_as for that case. However, if S isn't written out, it doesn't make sense to clear PgpSignAs. Also, since the function is shared by mutt_edit_headers(), we don't want the "clearing" behavior for that case. I wonder if a better fix would be: - && (set_signas || *sign_as)) + && (*sign_as || (set_signas && (flags & SIGN))) I'll post a revised patch for comments tomorrow. -Kevin
signature.asc
Description: PGP signature
