summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2013-08-13 21:25:28 +0200
committerBenny Baumann <BenBE@geshi.org>2013-08-13 21:25:28 +0200
commit90a9b6b26dbef01dfc0c16a43cafb3e0636c3e25 (patch)
treec869a8f3af7ded6a5e943a813f18c7a517561c9d
parente4d5df60c1c443d0e4a516cc9aa5d5d7cdb0b55a (diff)
parent75693292de2d907bf2a4b0f12abd7cd68781f95a (diff)
downloadcacert-devel-90a9b6b26dbef01dfc0c16a43cafb3e0636c3e25.tar.gz
cacert-devel-90a9b6b26dbef01dfc0c16a43cafb3e0636c3e25.tar.xz
cacert-devel-90a9b6b26dbef01dfc0c16a43cafb3e0636c3e25.zip
Merge branch 'bug-1123' into merge-bug-1177-893-1136-1123-1137
Conflicts: includes/account.php pages/account/10.php pages/account/3.php pages/gpg/0.php www/gpg.php
-rw-r--r--includes/account.php20
-rw-r--r--pages/account/10.php4
-rw-r--r--pages/account/3.php28
-rw-r--r--pages/gpg/0.php2
-rw-r--r--www/gpg.php11
5 files changed, 58 insertions, 7 deletions
diff --git a/includes/account.php b/includes/account.php
index eae7500..6a92669 100644
--- a/includes/account.php
+++ b/includes/account.php
@@ -182,6 +182,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!"));
@@ -311,6 +319,8 @@
exit;
}
+ write_user_agreement(intval($_SESSION['profile']['id']), "CCA", "certificate creation", "", 1);
+
$query = "insert into emailcerts set
`CN`='$defaultemail',
`keytype`='NS',
@@ -635,6 +645,14 @@
if($process != "" && $oldid == 10)
{
+ 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;
+ }
+
$CSR = clean_csr($_REQUEST['CSR']);
if(strpos($CSR,"---BEGIN")===FALSE)
{
@@ -751,6 +769,8 @@
if($_SESSION['_config']['rootcert'] < 1 || $_SESSION['_config']['rootcert'] > 2)
$_SESSION['_config']['rootcert'] = 1;
+ write_user_agreement(intval($_SESSION['profile']['id']), "CCA", "certificate creation", "", 1);
+
if(array_key_exists('0',$_SESSION['_config']['rowid']) && $_SESSION['_config']['rowid']['0'] > 0)
{
$query = "insert into `domaincerts` set
diff --git a/pages/account/10.php b/pages/account/10.php
index f83e0d8..48bcb1f 100644
--- a/pages/account/10.php
+++ b/pages/account/10.php
@@ -38,7 +38,9 @@
<p><?=_("Optional comment, only used in the certifictate overview")?><br>
<input type="text" name="description" maxlength="80" size=80/></p>
<p><?=_("Paste your CSR(Certificate Signing Request) below...")?></p>
-<textarea name="CSR" cols="80" rows="15"></textarea><br>
+<textarea name="CSR" cols="80" rows="15"></textarea><br />
+<p><input type="checkbox" name="CCA" /> <strong><?=sprintf(_("I accept the CAcert Community Agreement (%s)."),"<a href='/policy/CAcertCommunityAgreement.html'>CCA</a>")?></strong><br />
+ <?=_("Please Note: You need to accept the CCA to proceed.")?></p>
<input type="submit" name="process" value="<?=_("Submit")?>"/>
<input type="hidden" name="oldid" value="<?=$id?>"/>
</form>
diff --git a/pages/account/3.php b/pages/account/3.php
index c2165c2..b760c11 100644
--- a/pages/account/3.php
+++ b/pages/account/3.php
@@ -70,17 +70,21 @@ if($_SESSION['profile']['points'] >= 50)
<? } ?>
<? if($_SESSION['profile']['points'] >= 100 && $_SESSION['profile']['codesign'] > 0) { ?>
<tr>
+ <td class="DataTD">
+ <input type="checkbox" name="codesign" value="1" />
+ </td>
<td class="DataTD" align="left">
- <input type="checkbox" name="codesign" value="1" /> <?=_("Code Signing")?></td>
- <td class="DataTD" align="left">
+ <?=_("Code Signing")?><br />
<?=_("Please Note: By ticking this box you will automatically have your name included in any certificates.")?>
</td>
</tr>
<? } ?>
<tr>
- <td class="DataTD" colspan="2" align="left">
- <input type="checkbox" name="login" value="1" checked="checked" /> <?=_("Enable certificate login with this certificate")?><br />
+ <td class="DataTD">
+ <input type="checkbox" name="login" value="1" checked="checked" />
+ </td>
+ <td class="DataTD"> <?=_("Enable certificate login with this certificate")?><br />
<?=_("By allowing certificate login, this certificate can be used to login into this account at https://secure.cacert.org/ .")?><br/>
</td>
</tr>
@@ -92,8 +96,11 @@ if($_SESSION['profile']['points'] >= 50)
</tr>
<tr name="expertoff" style="display:none">
- <td class="DataTD" colspan="2" align="left">
- <input type="checkbox" name="expertbox" onchange="showExpert(this.checked)"/><?=_("Show advanced options")?>
+ <td class="DataTD">
+ <input type="checkbox" name="expertbox" onchange="showExpert(this.checked)" />
+ </td>
+ <td class="DataTD">
+ <?=_("Show advanced options")?>
</td>
</tr>
@@ -114,6 +121,15 @@ if($_SESSION['profile']['points'] >= 50)
<td class="DataTD" colspan="2"><textarea name="optionalCSR" cols="80" rows="5"></textarea></td>
</tr>
<tr>
+ <td class="DataTD">
+ <input type="checkbox" name="CCA" />
+ </td>
+ <td class="DataTD" align="left">
+ <strong><?=sprintf(_("I accept the CAcert Community Agreement (%s)."),"<a href='/policy/CAcertCommunityAgreement.html'>CCA</a>")?></strong><br />
+ <?=_("Please Note: You need to accept the CCA to proceed.")?>
+ </td>
+ </tr>
+ <tr>
<td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Next")?>" /></td>
</tr>
</table>
diff --git a/pages/gpg/0.php b/pages/gpg/0.php
index 7c7a37b..f490511 100644
--- a/pages/gpg/0.php
+++ b/pages/gpg/0.php
@@ -22,6 +22,8 @@
<p><?=_("Optional comment, only used in the certifictate overview")?><br />
<input type="text" name="description" maxlength="80" size=80 /></p>
<textarea name="CSR" cols="80" rows="15"><?=array_key_exists('CSR',$_POST)?strip_tags($_POST['CSR']):""?></textarea><br />
+<p><input type="checkbox" name="CCA" /> <strong><?=sprintf(_("I accept the CAcert Community Agreement (%s)."),"<a href='/policy/CAcertCommunityAgreement.html'>CCA</a>")?></strong><br />
+ <?=_("Please Note: You need to accept the CCA to proceed.")?></p>
<input type="submit" name="process" value="<?=_("Submit")?>" />
<input type="hidden" name="oldid" value="<?=$id?>" />
</form>
diff --git a/www/gpg.php b/www/gpg.php
index 317072c..4133cd9 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');
@@ -274,6 +283,8 @@ function verifyEmail($email)
if($oldid == "0" && $CSR != "")
{
+ write_user_agreement(intval($_SESSION['profile']['id']), "CCA", "certificate creation", "", 1);
+
//set variable for comment
if(trim($_REQUEST['description']) == ""){
$description= "";