- =_("Change Password")?>
+ =_("Delete Account")?>
=_("Email")?>:
=sanitizeHTML($_REQUEST['email'])?>
+
+ =_("New Username from arbitration number + sequence number a20xxyyzz.a.b")?>:
+
+
=_("Are you sure you want to delete this user, while not actually deleting the account it will completely disable it and revoke any/all certificates currently issued.")?>
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 @@
=_("Optional comment, only used in the certifictate overview")?>
+ =sprintf(_("I accept the CAcert Community Agreement (%s)."),"CCA ")?>
+ =_("Please Note: You need to accept the CCA to proceed.")?>
" />
diff --git a/pages/wot/15.php b/pages/wot/15.php
index 8579588..cca2702 100644
--- a/pages/wot/15.php
+++ b/pages/wot/15.php
@@ -16,7 +16,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
- include_once($_SESSION['_config']['filepath']."/includes/wot.inc.php");
+ require_once($_SESSION['_config']['filepath']."/includes/notary.inc.php");
$userid = intval($_SESSION['profile']['id']);
diff --git a/pages/wot/4.php b/pages/wot/4.php
index befdfe4..628e6a5 100644
--- a/pages/wot/4.php
+++ b/pages/wot/4.php
@@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-require_once(dirname(__FILE__).'/../../includes/wot.inc.php');
+require_once(dirname(__FILE__).'/../../includes/notary.inc.php');
?>
=_("Trusted Third Parties")?>
diff --git a/pages/wot/6.php b/pages/wot/6.php
index 28c1875..1031090 100644
--- a/pages/wot/6.php
+++ b/pages/wot/6.php
@@ -40,20 +40,20 @@
$name = $fname." ".$mname." ".$lname." ".$suffix;
$_SESSION['_config']['wothash'] = md5($name."-".$dob);
- include_once($_SESSION['_config']['filepath']."/includes/wot.inc.php");
+ require_once($_SESSION['_config']['filepath']."/includes/notary.inc.php");
AssureHead(_("Assurance Confirmation"),sprintf(_("Please check the following details match against what you witnessed when you met %s in person. You MUST NOT proceed unless you are sure the details are correct. You may be held responsible by the CAcert Arbitrator for any issues with this Assurance."), $fname));
AssureTextLine(_("Name"),$name);
AssureTextLine(_("Date of Birth"),$dob." ("._("YYYY-MM-DD").")");
- AssureBoxLine("certify",sprintf(_("I certify that %s %s %s has appeared in person"), $fname, $mname, $lname),array_key_exists('certify',$_POST) && $_POST['certify'] == 1);
+ AssureMethodLine(_("Method"),$methods,'');
+ AssureBoxLine("certify",sprintf(_("I certify that %s %s %s has appeared in person."), $fname, $mname, $lname),array_key_exists('certify',$_POST) && $_POST['certify'] == 1);
+ AssureBoxLine("CCAAgreed",sprintf(_("I verify that %s %s %s has accepted the CAcert Community Agreement."), $fname, $mname, $lname),array_key_exists('CCAAgreed',$_POST) && $_POST['CCAAgreed'] == 1);
AssureInboxLine("location",_("Location"),array_key_exists('location',$_SESSION['_config'])?$_SESSION['_config']['location']:"","");
- AssureInboxLine("date",_("Date"),array_key_exists('date',$_SESSION['_config'])?$_SESSION['_config']['date']:date("Y-m-d")," "._("Please adjust the date if you assured the person on a different day"));
- AssureMethodLine(_("Method"),$methods,_("Only tick the next box if the Assurance was face to face."));
+ AssureInboxLine("date",_("Date"),array_key_exists('date',$_SESSION['_config'])?$_SESSION['_config']['date']:date("Y-m-d")," "._("The date when the assurance took place. Please adjust the date if you assured the person on a different day (YYYY-MM-DD)."));
+ AssureTextLine("",_("Only tick the next box if the Assurance was face to face."));
AssureBoxLine("assertion",_("I believe that the assertion of identity I am making is correct, complete and verifiable. I have seen original documentation attesting to this identity. I accept that the CAcert Arbitrator may call upon me to provide evidence in any dispute, and I may be held responsible."),array_key_exists('assertion',$_POST) && $_POST['assertion'] == 1);
- AssureBoxLine("rules",_("I have read and understood the Assurance Policy and the Assurance Handbook and am making this Assurance subject to and in compliance with the policy and handbook."),array_key_exists('rules',$_POST) && $_POST['rules'] == 1);
- AssureTextLine(_("Policy"),""._("Assurance Policy")." - "._("Assurance Handbook")." ");
+ AssureBoxLine("rules",_("I have read and understood the CAcert Community Agreement (CCA), Assurance Policy and the Assurance Handbook. I am making this Assurance subject to and in compliance with the CCA, Assurance policy and handbook."),array_key_exists('rules',$_POST) && $_POST['rules'] == 1);
+ AssureTextLine(_("Policy"),""._("CAcert Community Agreement")." -"._("Assurance Policy")." - "._("Assurance Handbook")." ");
AssureInboxLine("points",_("Points"),""," (Max. ".maxpoints().")");
- AssureCCABoxLine("CCAAgreed",sprintf(_("Check this box only if %s agreed to the CAcert Community Agreement "),$fname));
- AssureCCABoxLine("CCAAgree",_("Check this box only if YOU agree to the CAcert Community Agreement "));
AssureFoot($id,_("I confirm this Assurance"));
?>
diff --git a/www/disputes.php b/www/disputes.php
index 4944d8c..34a447a 100644
--- a/www/disputes.php
+++ b/www/disputes.php
@@ -17,6 +17,7 @@
*/ ?>
require_once("../includes/loggedin.php");
+ require_once("../includes/notary.inc.php");
loadem("account");
@@ -58,24 +59,13 @@
{
$row = mysql_fetch_assoc($res);
echo $row['email']." \n";
- $query = "select `emailcerts`.`id`
- from `emaillink`,`emailcerts` where
- `emailid`='$emailid' and `emaillink`.`emailcertsid`=`emailcerts`.`id` and
- `revoked`=0 and UNIX_TIMESTAMP(`expire`)-UNIX_TIMESTAMP() > 0
- group by `emailcerts`.`id`";
- $dres = mysql_query($query);
- while($drow = mysql_fetch_assoc($dres))
- mysql_query("update `emailcerts` set `revoked`='1970-01-01 10:00:01' where `id`='".intval($drow['id'])."'");
-
- $do = `../scripts/runclient`;
- $query = "update `email` set `deleted`=NOW() where `id`='".intval($emailid)."'";
- mysql_query($query);
+ account_email_delete($row['id']);
}
mysql_query("update `disputeemail` set hash='',action='accept' where `id`='$emailid'");
- $rc = mysql_num_rows(mysql_query("select * from `domains` where `memid`='$oldmemid' and `deleted`=0"));
- $rc = mysql_num_rows(mysql_query("select * from `email` where `memid`='$oldmemid' and `deleted`=0 and `id`!='$emailid'"));
- $res = mysql_query("select * from `users` where `id`='$oldmemid'");
- $user = mysql_fetch_assoc($res);
+ $rc = mysql_num_rows(mysql_query("select * from `domains` where `memid`='$oldmemid' and `deleted`=0"));
+ $rc2 = mysql_num_rows(mysql_query("select * from `email` where `memid`='$oldmemid' and `deleted`=0 and `id`!='$emailid'"));
+ $res = mysql_query("select * from `users` where `id`='$oldmemid'");
+ $user = mysql_fetch_assoc($res);
if($rc == 0 && $rc2 == 0 && $_SESSION['_config']['email'] == $user['email'])
{
mysql_query("update `users` set `deleted`=NOW() where `id`='$oldmemid'");
@@ -160,17 +150,13 @@
showheader(_("Domain Dispute"));
echo ""._("You have opted to accept this dispute and the request will now remove this domain from the existing account, and revoke any current certificates.")."
";
echo ""._("The following accounts have been removed:")." \n";
+ //new account_domain_delete($domainid, $memberID)
$query = "select * from `domains` where `id`='$domainid' and deleted=0";
$res = mysql_query($query);
if(mysql_num_rows($res) > 0)
{
- echo $_SESSION['_config']['domain']." \n";
- mysql_query("update `domains` set `deleted`=NOW() where `id`='$domainid'");
- $query = "select * from `domlink` where `domid`='$domainid'";
- $res = mysql_query($query);
- while($row = mysql_fetch_assoc($res))
- mysql_query("update `domaincerts` set `revoked`='1970-01-01 10:00:01' where `id`='".$row['certid']."' and `revoked`=0 and UNIX_TIMESTAMP(`expire`)-UNIX_TIMESTAMP() > 0");
- $do = `../scripts/runserver`;
+ echo $_SESSION['_config']['domain']." \n";
+ account_domain_delete($domainid);
}
mysql_query("update `disputedomain` set hash='',action='accept' where `id`='$domainid'");
showfooter();
diff --git a/www/gpg.php b/www/gpg.php
index bf8ba29..f24d84c 100644
--- a/www/gpg.php
+++ b/www/gpg.php
@@ -18,6 +18,7 @@
require_once("../includes/loggedin.php");
require_once("../includes/lib/general.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;
@@ -83,6 +84,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;
+ }
+
$err = runCommand('mktemp --directory /tmp/cacert_gpg.XXXXXXXXXX',
"",
$tmpdir);
@@ -293,6 +302,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= "";
diff --git a/www/wot.php b/www/wot.php
index 1b84f51..8395a58 100644
--- a/www/wot.php
+++ b/www/wot.php
@@ -18,6 +18,8 @@
require_once("../includes/loggedin.php");
require_once("../includes/lib/l10n.php");
+require_once("../includes/notary.inc.php");
+
function show_page($target,$message,$error)
@@ -113,9 +115,6 @@ function send_reminder()
$_SESSION['_config']['error'] = _("A reminder notice has been sent.");
}
-
-
-
loadem("account");
if(array_key_exists('date',$_POST) && $_POST['date'] != "")
$_SESSION['_config']['date'] = $_POST['date'];
@@ -127,7 +126,7 @@ function send_reminder()
if($oldid == 12)
$id = $oldid;
-
+
if($oldid == 4)
{
if ($_POST['ttp']!='') {
@@ -238,37 +237,79 @@ function send_reminder()
if($oldid == 6)
{
$iecho= "c";
+ //date checks
+ if(trim($_REQUEST['date']) == '')
+ {
+ show_page("VerifyData","",_("You must enter the date when you met the assuree."));
+ exit;
+ }
+
+ if(!check_date_format(trim($_REQUEST['date'])))
+ {
+ show_page("VerifyData","",_("You must enter the date in this format: YYYY-MM-DD."));
+ exit;
+ }
+
+ if(!check_date_difference(trim($_REQUEST['date'])))
+ {
+ show_page("VerifyData","",_("You must not enter a date in the future."));
+ exit;
+ }
+
+ //proof of identity check and accept arbitration, implements CCA
if(!array_key_exists('assertion',$_POST) || $_POST['assertion'] != 1)
{
show_page("VerifyData","",_("You failed to check all boxes to validate your adherence to the rules and policies of CAcert"));
exit;
}
-/* if(!array_key_exists('rules',$_POST) || $_POST['rules'] != 1)
+ //proof of CCA agreement by assuree after 2010-01-01
+ if((!array_key_exists('CCAAgreed',$_POST) || $_POST['CCAAgreed'] != 1) and (check_date_format(trim($_REQUEST['date']),2010)))
+ {
+ show_page("VerifyData","",_("You failed to check all boxes to validate your adherence to the rules and policies of CAcert"));
+ exit;
+ }
+
+ //assurance done according to rules
+ if(!array_key_exists('rules',$_POST) || $_POST['rules'] != 1)
{
show_page("VerifyData","",_("You failed to check all boxes to validate your adherence to the rules and policies of CAcert"));
exit;
}
-*/
- if((!array_key_exists('certify',$_POST) || $_POST['certify'] != 1 ) && $_SESSION['profile']['ttpadmin'] != 1)
+ //met assuree in person, not appliciable for TTP / TTP Topup assurances
+ if((!array_key_exists('certify',$_POST) || $_POST['certify'] != 1 ) && $_REQUEST['method'] != "Trusted 3rd Parties")
{
show_page("VerifyData","",_("You failed to check all boxes to validate your adherence to the rules and policies of CAcert"));
exit;
}
- if($_SESSION['profile']['ttpadmin'] != 1 && $_POST['location'] == "")
+ //check location, min 3 characters
+ if(!array_key_exists('location',$_POST) || trim($_POST['location']) == "")
{
show_page("VerifyData","",_("You failed to enter a location of your meeting."));
exit;
}
- if($_REQUEST['points'] == "")
+ if(strlen(trim($_REQUEST['location']))<=2)
+ {
+ show_page("VerifyData","",_("You must enter a location with at least 3 characters eg town and country."));
+ exit;
+ }
+
+ //check for points in range 0-35, for nucleus 35 + 15 temporary
+ if($_REQUEST['points'] == "" || !is_numeric($_REQUEST['points']))
{
show_page("VerifyData","",_("You must enter the number of points you wish to allocate to this person."));
exit;
}
+ if($_REQUEST['points'] <0 || ($_REQUEST['points']>35))
+ {
+ show_page("VerifyData","",_("The number of points you entered are out of the range given by policy."));
+ exit;
+ }
+
$query = "select * from `users` where `id`='".$_SESSION['_config']['notarise']['id']."'";
$res = mysql_query($query);
$row = mysql_fetch_assoc($res);
@@ -315,7 +356,7 @@ $iecho= "c";
$res = mysql_query($query);
if(mysql_num_rows($res) > 0)
{
- show_page("VerifyEmail","",_("Identical Assurance attempted, will not continue."));
+ show_page("VerifyEmail","",_("Identical Assurance attempted, will not continue."));
exit;
}
}
@@ -328,6 +369,10 @@ $iecho= "c";
`location`='".mysql_escape_string(stripslashes($_POST['location']))."',
`date`='".mysql_escape_string(stripslashes($_POST['date']))."',
`when`=NOW()";
+ //record active acceptance by Assurer
+ if (check_date_format(trim($_REQUEST['date']),2010)) {
+ write_user_agreement($_SESSION['profile']['id'], "CCA", "Assurance", "Assurer", 1, $_SESSION['_config']['notarise']['id']);
+ }
if($_SESSION['profile']['ttpadmin'] == 1 && ($_POST['method'] == 'Trusted 3rd Parties' || $_POST['method'] == 'Trusted Third Parties')) {
$query .= ",\n`method`='TTP-Assisted'";
}
@@ -404,16 +449,16 @@ $iecho= "c";
echo "
"._("Shortly you and the person you were assuring will receive an email confirmation. There is no action on your behalf required to complete this.")."
";
?>
@@ -466,7 +511,7 @@ $iecho= "c";
$subject = $_REQUEST['subject'];
$userid = intval($_REQUEST['userid']);
$user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='$userid' and `listme`=1"));
- $points = mysql_num_rows(mysql_query("select sum(`points`) as `total` from `notary`
+ $points = mysql_num_rows(mysql_query("select sum(`points`) as `total` from `notary`
where `to`='".$user['id']."' group by `to` HAVING SUM(`points`) > 0"));
if($points > 0)
{