From 32c9710e36d3b73f7257a8e590412bb109e6d407 Mon Sep 17 00:00:00 2001 From: Benny Baumann Date: Sun, 14 Jul 2013 22:26:44 +0200 Subject: bug 1123: implement CCA acception for client certs --- includes/account.php | 11 +++++++++++ pages/account/3.php | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/includes/account.php b/includes/account.php index 05b07a7..0899ba6 100644 --- a/includes/account.php +++ b/includes/account.php @@ -18,6 +18,7 @@ require_once("../includes/loggedin.php"); require_once("../includes/lib/l10n.php"); require_once('lib/check_weak_key.php'); + require_once('notary.inc.php'); loadem("account"); @@ -193,6 +194,14 @@ if($process != "" && $oldid == 3) { + 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; + } + if(!(array_key_exists('addid',$_REQUEST) && is_array($_REQUEST['addid'])) && $_REQUEST['SSO'] != '1') { showheader(_("My CAcert.org Account!")); @@ -317,6 +326,8 @@ exit; } + write_user_agreement(intval($_SESSION['profile']['id']), "CCA", "certificate creation", "", 1); + $query = "insert into emailcerts set `CN`='$defaultemail', `keytype`='NS', diff --git a/pages/account/3.php b/pages/account/3.php index 87484f9..2402ae4 100644 --- a/pages/account/3.php +++ b/pages/account/3.php @@ -114,6 +114,15 @@ if($_SESSION['profile']['points'] >= 50) + + + + + + CCA")?>
+ + + "> -- cgit v1.2.1