From 0b503fa61636c8358f29a756d9d249d16f6c7a5e Mon Sep 17 00:00:00 2001 From: fkrone Date: Sat, 31 Jan 2015 19:14:21 +0100 Subject: [PATCH] Fixing critical bug: looking up email addresses for PGP encryption in keychain was done case sensitive --- GnuPG/__init__.py | 2 +- README.md | 1 - gpg-mailgate.py | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GnuPG/__init__.py b/GnuPG/__init__.py index befd847..efdb9ea 100644 --- a/GnuPG/__init__.py +++ b/GnuPG/__init__.py @@ -33,7 +33,7 @@ def public_keys( keyhome ): if line[0:3] == 'uid' or line[0:3] == 'pub': if ('<' not in line or '>' not in line): continue - key = line.split('<')[1].split('>')[0] + key = line.split('<')[1].split('>')[0].lower() if keys.count(key) == 0: keys.append(key) return keys diff --git a/README.md b/README.md index 6bf3c31..ffa12a5 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,6 @@ This is a combined work of many developers and contributors: # To Do * clean up code -* rewrite templates for register-handler * rewrite and improve installation instructions * rewrite readme of gpg-mailgate-web in markdown * rename from gpg-mailgate to openpgp-s-mime-mailgate or something..... diff --git a/gpg-mailgate.py b/gpg-mailgate.py index 9951833..d3e0e3b 100755 --- a/gpg-mailgate.py +++ b/gpg-mailgate.py @@ -167,6 +167,7 @@ gpg_to = list() ungpg_to = list() for to in to_addrs: + to = to.lower() if to in keys and not ( cfg['default'].has_key('keymap_only') and cfg['default']['keymap_only'] == 'yes' ): gpg_to.append( (to, to) ) elif cfg.has_key('keymap') and cfg['keymap'].has_key(to):