summaryrefslogtreecommitdiff
path: root/www/gpg.php
diff options
context:
space:
mode:
authorMarkus Warg <mw@it-sls.de>2010-03-29 11:37:44 +0200
committerMarkus Warg <mw@it-sls.de>2010-03-29 11:37:44 +0200
commit6c2e9fb5dc29c53e2daa980272789b79827f6a22 (patch)
treea29887cb36dac43264398a18cfc3ffe179b7e06a /www/gpg.php
parenteab6644f0f372e5334ae4921f0e84cebbdca025d (diff)
downloadcacert-devel-6c2e9fb5dc29c53e2daa980272789b79827f6a22.tar.gz
cacert-devel-6c2e9fb5dc29c53e2daa980272789b79827f6a22.tar.xz
cacert-devel-6c2e9fb5dc29c53e2daa980272789b79827f6a22.zip
patch from Phillip (Mantis #814)
https://bugs.cacert.org/view.php?id=814
Diffstat (limited to 'www/gpg.php')
-rw-r--r--www/gpg.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/www/gpg.php b/www/gpg.php
index f97966f..894f298 100644
--- a/www/gpg.php
+++ b/www/gpg.php
@@ -104,11 +104,25 @@ function verifyEmail($email)
$resulttable=_("The following UIDs were found in your key:")."<br/><table border='1'><tr><td>#</td><td>"._("Name")."</td><td>"._("Email")."</td><td>Result</td>";
$i=0;
$lastvalidemail="";
+ $npubs=0;
foreach(explode("\n", $gpg) as $line)
{
$bits = explode(":", $line);
$resulttable.="<tr><td>".++$i."</td>";
$name = $comment = "";
+ if($bits[0] == "pub")
+ {
+ $npubs++;
+ }
+ if($npubs>1)
+ {
+ showheader(_("Welcome to CAcert.org"));
+ echo "<font color='#ff0000'>"._("Please upload only one key at a time.")."</font>";
+ unset($_REQUEST['process']);
+ $id = $oldid;
+ unset($oldid);
+ exit();
+ }
if($bits[0] == "pub" && (!$keyid || !$when))
{
$keyid = $bits[4];