* [Gaudenz Steinlin] Bug#810784: should match email adress case insensitive when sending encrypted mail
@ 2016-01-12 16:44 David Bremner
2016-01-15 18:47 ` Daniel Kahn Gillmor
0 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2016-01-12 16:44 UTC (permalink / raw)
To: notmuch
[-- Attachment #0: Type: message/rfc822, Size: 6745 bytes --]
From: Gaudenz Steinlin <gaudenz@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Bug#810784: should match email adress case insensitive when sending encrypted mail
Date: Tue, 12 Jan 2016 10:11:35 +0100
Message-ID: <145258989575.18569.5159990776586528569.reportbug@moebius.durcheinandertal.private>
Package: notmuch-emacs
Version: 0.21-3
Severity: normal
When sending encrypted mail the key lookup to encrypt to is done case
sensitive on the mail address. As mail addresses are case insensitive
this should be done case insensitive. Otherwise keys for users which for
some reason have uppercase letters in their email address in the key UID
are not found.
Gaudenz
P.S.: I'm not completely sure if this part of the mail sending is done
by notmuch-emacs or some other part of emacs. Feel free to reassign as
appropriate.
-- System Information:
Debian Release: stretch/sid
APT prefers testing-proposed-updates
APT policy: (500, 'testing-proposed-updates'), (500, 'testing'), (100, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages notmuch-emacs depends on:
ii emacs24 24.5+1-3
ii emacsen-common 2.0.8
ii notmuch 0.21-3
notmuch-emacs recommends no packages.
notmuch-emacs suggests no packages.
-- no debconf information
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Gaudenz Steinlin] Bug#810784: should match email adress case insensitive when sending encrypted mail
2016-01-12 16:44 [Gaudenz Steinlin] Bug#810784: should match email adress case insensitive when sending encrypted mail David Bremner
@ 2016-01-15 18:47 ` Daniel Kahn Gillmor
2016-02-08 21:44 ` David Edmondson
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Kahn Gillmor @ 2016-01-15 18:47 UTC (permalink / raw)
To: David Bremner, Gaudenz Steinlin, notmuch, 810784
On Tue 2016-01-12 11:44:18 -0500, David Bremner wrote:
> [gaudenz wrote:]
>> When sending encrypted mail the key lookup to encrypt to is done case
>> sensitive on the mail address. As mail addresses are case insensitive
>> this should be done case insensitive. Otherwise keys for users which for
>> some reason have uppercase letters in their email address in the key UID
>> are not found.
fwiw, i agree with gaudenz that this is the right thing to do, despite
being a gray area.
For the right-hand side of an e-mail address (the stuff after the @; the
e-mail domain), the DNS label there is case-insensitive by definition.
There may be some additional thinking to be done here when thinking
about non-ASCII DNS labels in the RHS, though -- should we be
normalizing the domain names in doing the search? using punycode?
The stuff before the @ is a bit more problematic.
According to the standards documents, the left-hand-side of an e-mail
address (the "domain-specific" part) is up to the mail domain to parse
and process. So it would not be a violation of the public
specifications for the operator of the MX for example.org to provide
three distinct mailboxes for alice@example.org and Alice@example.org and
ALICE@example.org.
However, i know of no mail providers that do so, and anyone proposing to
do such a thing should have their head examined.
Examining GnuPG's interface here, it looks like gpg already does
case-insensitive matching when searching for an e-mail address
surrounded by angle-brackets.
So where is the case-insensitive lookup happening? Is this a bug in
mml-mode, or in notmuch-emacs?
--dkg
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Gaudenz Steinlin] Bug#810784: should match email adress case insensitive when sending encrypted mail
2016-01-15 18:47 ` Daniel Kahn Gillmor
@ 2016-02-08 21:44 ` David Edmondson
2016-02-08 22:08 ` David Edmondson
0 siblings, 1 reply; 6+ messages in thread
From: David Edmondson @ 2016-02-08 21:44 UTC (permalink / raw)
To: Daniel Kahn Gillmor, David Bremner, Gaudenz Steinlin, notmuch,
810784
On Fri, Jan 15 2016, Daniel Kahn Gillmor wrote:
> So where is the case-insensitive lookup happening? Is this a bug in
> mml-mode, or in notmuch-emacs?
It's caused by behaviour in mml2015.el (hence upstream).
`mml2015-epg-check-user-id' uses `equal' to compare the recipient from
the composition buffer with the addresses from the matching key.
The simplest way to get the desired behaviour would be to `downcase'
both strings before comparing.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Gaudenz Steinlin] Bug#810784: should match email adress case insensitive when sending encrypted mail
2016-02-08 21:44 ` David Edmondson
@ 2016-02-08 22:08 ` David Edmondson
2016-02-09 15:36 ` David Edmondson
0 siblings, 1 reply; 6+ messages in thread
From: David Edmondson @ 2016-02-08 22:08 UTC (permalink / raw)
To: Daniel Kahn Gillmor, David Bremner, Gaudenz Steinlin, notmuch,
810784
On Mon, Feb 08 2016, David Edmondson wrote:
> On Fri, Jan 15 2016, Daniel Kahn Gillmor wrote:
>> So where is the case-insensitive lookup happening? Is this a bug in
>> mml-mode, or in notmuch-emacs?
>
> It's caused by behaviour in mml2015.el (hence upstream).
>
> `mml2015-epg-check-user-id' uses `equal' to compare the recipient from
> the composition buffer with the addresses from the matching key.
>
> The simplest way to get the desired behaviour would be to `downcase'
> both strings before comparing.
Reported as bug#22603 in emacs.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Gaudenz Steinlin] Bug#810784: should match email adress case insensitive when sending encrypted mail
2016-02-08 22:08 ` David Edmondson
@ 2016-02-09 15:36 ` David Edmondson
2016-02-10 8:28 ` Tomi Ollila
0 siblings, 1 reply; 6+ messages in thread
From: David Edmondson @ 2016-02-09 15:36 UTC (permalink / raw)
To: Daniel Kahn Gillmor, David Bremner, Gaudenz Steinlin, notmuch,
810784
On Mon, Feb 08 2016, David Edmondson wrote:
> On Mon, Feb 08 2016, David Edmondson wrote:
>> On Fri, Jan 15 2016, Daniel Kahn Gillmor wrote:
>>> So where is the case-insensitive lookup happening? Is this a bug in
>>> mml-mode, or in notmuch-emacs?
>>
>> It's caused by behaviour in mml2015.el (hence upstream).
>>
>> `mml2015-epg-check-user-id' uses `equal' to compare the recipient from
>> the composition buffer with the addresses from the matching key.
>>
>> The simplest way to get the desired behaviour would be to `downcase'
>> both strings before comparing.
>
> Reported as bug#22603 in emacs.
Fixed in the emacs-25 branch.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Gaudenz Steinlin] Bug#810784: should match email adress case insensitive when sending encrypted mail
2016-02-09 15:36 ` David Edmondson
@ 2016-02-10 8:28 ` Tomi Ollila
0 siblings, 0 replies; 6+ messages in thread
From: Tomi Ollila @ 2016-02-10 8:28 UTC (permalink / raw)
To: David Edmondson, Daniel Kahn Gillmor, David Bremner,
Gaudenz Steinlin, notmuch, 810784
On Tue, Feb 09 2016, David Edmondson <dme@dme.org> wrote:
> On Mon, Feb 08 2016, David Edmondson wrote:
>> On Mon, Feb 08 2016, David Edmondson wrote:
>>> On Fri, Jan 15 2016, Daniel Kahn Gillmor wrote:
>>>> So where is the case-insensitive lookup happening? Is this a bug in
>>>> mml-mode, or in notmuch-emacs?
>>>
>>> It's caused by behaviour in mml2015.el (hence upstream).
>>>
>>> `mml2015-epg-check-user-id' uses `equal' to compare the recipient from
>>> the composition buffer with the addresses from the matching key.
>>>
>>> The simplest way to get the desired behaviour would be to `downcase'
>>> both strings before comparing.
>>
>> Reported as bug#22603 in emacs.
>
> Fixed in the emacs-25 branch.
We could perhaps add defadvice to **wiki** for those who want to
do global change in their emacs environment, something like:
(if (< emacs-major-version 25)
(defadvice mml2015-epg-check-user-id (around downcase activate)
(ad-set-arg 1 (downcase (ad-get-arg 1)))
(ad-set-arg 2 (downcase (ad-get-arg 2)))
ad-do-it))
totally untested -- also now that I finished that 'before might also work.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-02-10 8:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-12 16:44 [Gaudenz Steinlin] Bug#810784: should match email adress case insensitive when sending encrypted mail David Bremner
2016-01-15 18:47 ` Daniel Kahn Gillmor
2016-02-08 21:44 ` David Edmondson
2016-02-08 22:08 ` David Edmondson
2016-02-09 15:36 ` David Edmondson
2016-02-10 8:28 ` Tomi Ollila
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.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).