summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2013-07-14 22:33:59 +0200
committerBenny Baumann <BenBE@geshi.org>2013-07-14 22:33:59 +0200
commit5ce73fd94b81c9444164815236e9d545635d7fda (patch)
tree0c930329a4d50f389e49ff97c15b5c651b7864f8 /www
parent654323f9f22b7d3c11dc5dd9959364d10f188a7d (diff)
downloadcacert-devel-5ce73fd94b81c9444164815236e9d545635d7fda.tar.gz
cacert-devel-5ce73fd94b81c9444164815236e9d545635d7fda.tar.xz
cacert-devel-5ce73fd94b81c9444164815236e9d545635d7fda.zip
bug 1123: added functionality to www/gpg.php
Diffstat (limited to 'www')
-rw-r--r--www/gpg.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/www/gpg.php b/www/gpg.php
index 345b559..267fabd 100644
--- a/www/gpg.php
+++ b/www/gpg.php
@@ -17,6 +17,7 @@
*/ ?>
<?
require_once("../includes/loggedin.php");
+ require_once('../includes/notary.inc.php');
$id = 0; if(array_key_exists('id',$_REQUEST)) $id=intval($_REQUEST['id']);
$oldid = $_REQUEST['oldid'] = array_key_exists('oldid',$_REQUEST) ? intval($_REQUEST['oldid']) : 0;
@@ -82,6 +83,14 @@ function verifyEmail($email)
$state=0;
if($oldid == "0" && $CSR != "")
{
+ if(!array_key_exists('CCA',$_REQUEST))
+ {
+ showheader(_("My CAcert.org Account!"));
+ echo _("You did not accept the CAcert Community Agreement (CCA), hit the back button and try again.");
+ showfooter();
+ exit;
+ }
+
$debugkey = $gpgkey = clean_gpgcsr($CSR);
$tnam = tempnam('/tmp/', '__gpg');
@@ -275,6 +284,8 @@ function verifyEmail($email)
if($oldid == "0" && $CSR != "")
{
+ write_user_agreement(intval($_SESSION['profile']['id']), "CCA", "certificate creation", "", 1);
+
$query = "insert into `gpg` set `memid`='".intval($_SESSION['profile']['id'])."',
`email`='".mysql_real_escape_string($lastvalidemail)."',
`level`='1',