unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Christophe TROESTLER <Christophe.TROESTLER@umons.ac.be>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: "36101@debbugs.gnu.org" <36101@debbugs.gnu.org>
Subject: bug#36101: 26.1; epg--status-*SIG does not always precent decode
Date: Wed, 23 Oct 2019 08:25:21 +0000	[thread overview]
Message-ID: <87r2337tsf.fsf@poincare.umons.ac.be> (raw)
In-Reply-To: <874l00n8cw.fsf@gnus.org>

[-- Attachment #1: Type: text/plain, Size: 1426 bytes --]

Hi,

On 22 October 2019 at 16:49 CEST, Lars Ingebrigtsen <larsi@gnus.org> wrote:
>
> Christophe TROESTLER <Christophe.TROESTLER@umons.ac.be> writes:
>
>> I received a message with a S/MIME signature that verified correctly (using gpgsm).  However, the button has undecoded percent escapes.  It turns out that the culprit is the function `epg--status-*SIG' which, when (epg-context-protocol context) is 'CMS and `epg-dn-from-string' triggers an error, does not perform the decoding of percent escapes.
>>
>> If, in the body of `epg-dn-from-string', one changes
>>
>> 	(condition-case nil
>> 	    (if (eq (epg-context-protocol context) 'CMS)
>> 		(setq user-id (epg-dn-from-string user-id))
>> 	      (setq user-id (epg--decode-percent-escape user-id)))
>> 	  (error))
>>
>> into
>>
>> 	(condition-case nil
>> 	    (if (eq (epg-context-protocol context) 'CMS)
>> 		(setq user-id (epg-dn-from-string user-id)))
>> 	  (error))
>> 	(setq user-id (epg--decode-percent-escape user-id))
>>
>> it works (provided http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36098 has been fixed first).  I do not think `epg--decode-percent-escape' can trigger `error' but it is protected everywhere it is used so maybe one should write
>
> Do you have an example here to display the bug?

I had a look to the code and it changed since this report.  IIRC, verifying my signature (with which I sign this message) used to display this problem.

Best,
C.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 3293 bytes --]

  reply	other threads:[~2019-10-23  8:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-05 14:09 bug#36101: 26.1; epg--status-*SIG does not always precent decode Christophe TROESTLER
2019-08-30 10:30 ` Lars Ingebrigtsen
2019-09-01 15:31   ` Noam Postavsky
2019-09-04 13:29 ` Lars Ingebrigtsen
2019-10-22 14:49 ` Lars Ingebrigtsen
2019-10-23  8:25   ` Christophe TROESTLER [this message]
2019-10-23  8:27     ` Christophe TROESTLER
2019-10-23  8:51       ` Lars Ingebrigtsen
2019-10-23 11:00         ` Christophe TROESTLER

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r2337tsf.fsf@poincare.umons.ac.be \
    --to=christophe.troestler@umons.ac.be \
    --cc=36101@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).