From 72aa45202a2db0253b3df336ed6e905fc65d346f Mon Sep 17 00:00:00 2001 From: root Date: Thu, 31 Jul 2008 21:25:36 +0000 Subject: [PATCH] Fixed a bug that the unsigned email addresses have been shown as the email addresses of the signed keys --- www/gpg.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/gpg.php b/www/gpg.php index c8ce390..9bda61f 100644 --- a/www/gpg.php +++ b/www/gpg.php @@ -103,6 +103,7 @@ function verifyEmail($email) $resulttable=_("The following UIDs were found your key:")."
"; $i=0; + $lastvalidemail=""; foreach(explode("\n", $gpg) as $line) { $resulttable.=""; @@ -214,6 +215,7 @@ function verifyEmail($email) { $nok++; $resulttable.=""; + $lastvalidemail=$mail; } else { @@ -253,7 +255,7 @@ function verifyEmail($email) if($oldid == "0" && $_REQUEST['CSR'] != "") { $query = "insert into `gpg` set `memid`='".$_SESSION['profile']['id']."', - `email`='".mysql_real_escape_string($mail)."', + `email`='".mysql_real_escape_string($lastvalidemail)."', `level`='1', `expires`='".mysql_real_escape_string($expires)."', `multiple`='".mysql_real_escape_string($multiple)."',
#"._("Name").""._("Email")."Result
".++$i."$rmessage