[git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-12-g957fe72
by Werner Koch
cvs at cvs.gnupg.org
Fri Jan 6 16:12:44 CET 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, master has been updated
via 957fe728466893bc63f5ccad197d3e245dca4bf3 (commit)
from 372fb4fc0661014ccd9275c89e6da2208f87155f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 957fe728466893bc63f5ccad197d3e245dca4bf3
Author: Werner Koch <wk at gnupg.org>
Date: Fri Jan 6 15:17:49 2012 +0100
gpg: Make the double space in the middle of a fingerprint optional.
This change might help to c+p a fingerprint from an HTML page without
being enclosed in a "pre" tag.
* common/userids.c (classify_user_id): Skip a second blank in the
middle of a fingerprint.
diff --git a/common/userids.c b/common/userids.c
index 2b13445..88593bf 100644
--- a/common/userids.c
+++ b/common/userids.c
@@ -313,13 +313,16 @@ classify_user_id (const char *name, KEYDB_SEARCH_DESC *desc, int openpgp_hack)
/* Still not found. Now check for a space separated
OpenPGP v4 fingerprint like:
8061 5870 F5BA D690 3336 86D0 F2AD 85AC 1E42 B367
+ or
+ 8061 5870 F5BA D690 3336 86D0 F2AD 85AC 1E42 B367
*/
hexlength = strspn (s, " 0123456789abcdefABCDEF");
if (s[hexlength] && s[hexlength] != ' ')
hexlength = 0; /* Followed by non-space. */
while (hexlength && s[hexlength-1] == ' ')
hexlength--; /* Trim trailing spaces. */
- if (hexlength == 50 && (!s[hexlength] || s[hexlength] == ' '))
+ if ((hexlength == 49 || hexlength == 50)
+ && (!s[hexlength] || s[hexlength] == ' '))
{
int i, c;
@@ -330,12 +333,12 @@ classify_user_id (const char *name, KEYDB_SEARCH_DESC *desc, int openpgp_hack)
if (*s != ' ')
break;
s++;
- if (i == 10)
- {
- if (*s != ' ')
- break;
- s++;
- }
+ /* Skip the double space in the middle but
+ don't require it to help copying
+ fingerprints from sources which fold
+ multiple space to one. */
+ if (i == 10 && *s == ' ')
+ s++;
}
c = hextobyte(s);
-----------------------------------------------------------------------
Summary of changes:
common/userids.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list