[svn] GnuPG - r4988 - branches/STABLE-BRANCH-1-4/keyserver
svn author dshaw
cvs at cvs.gnupg.org
Mon May 4 05:03:39 CEST 2009
Author: dshaw
Date: 2009-05-04 05:03:38 +0200 (Mon, 04 May 2009)
New Revision: 4988
Modified:
branches/STABLE-BRANCH-1-4/keyserver/ChangeLog
branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_mailto.in
Log:
* gpgkeys_mailto.in: Set 'mail-from' as a keyserver-option, rather
than the ugly ?from= syntax.
Modified: branches/STABLE-BRANCH-1-4/keyserver/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/keyserver/ChangeLog 2009-04-21 03:04:08 UTC (rev 4987)
+++ branches/STABLE-BRANCH-1-4/keyserver/ChangeLog 2009-05-04 03:03:38 UTC (rev 4988)
@@ -1,3 +1,8 @@
+2009-05-03 David Shaw <dshaw at jabberwocky.com>
+
+ * gpgkeys_mailto.in: Set 'mail-from' as a keyserver-option, rather
+ than the ugly ?from= syntax.
+
2009-04-20 David Shaw <dshaw at jabberwocky.com>
* gpgkeys_hkp.c (srv_replace): New function to transform a SRV
Modified: branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_mailto.in
===================================================================
--- branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_mailto.in 2009-04-21 03:04:08 UTC (rev 4987)
+++ branches/STABLE-BRANCH-1-4/keyserver/gpgkeys_mailto.in 2009-05-04 03:03:38 UTC (rev 4988)
@@ -52,10 +52,6 @@
open(STDIN,$ARGV[0]) || die "Can't open input file $ARGV[0]\n";
}
-($login,$name)=(getpwuid($<))[0,6];
-
-$from="$name <$login>";
-
while(<STDIN>)
{
last if($_ eq "\n");
@@ -85,9 +81,24 @@
{
$verbose--;
}
+ elsif($1=~/^mail-from=(.+)$/i)
+ {
+ $from=$1;
+ }
+ elsif($1=~/^no-mail-from$/i)
+ {
+ undef $from;
+ }
+
}
}
+if(!defined($from))
+{
+ ($login,$name)=(getpwuid($<))[0,6];
+ $from="$name <$login>";
+}
+
$program="(unknown)" if(!defined($program));
if(!defined($address))
@@ -96,29 +107,6 @@
exit(1);
}
-# decode $address
-
-($address,$args)=split(/\?/,$address);
-
-if(defined($args))
-{
- @pairs = split(/&/, $args);
- foreach $pair (@pairs)
- {
- ($hdr, $val) = split(/=/, $pair);
- $hdr =~ tr/+/ /;
- $hdr =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
- $val =~ tr/+/ /;
- $val =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
-# we only handle "from" right now
- if($hdr=~/^from$/i)
- {
- $from=$val;
- last;
- }
- }
-}
-
while(<STDIN>)
{
last if($_ eq "\n");
More information about the Gnupg-commits
mailing list