summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/api/ccsr.php24
-rw-r--r--www/api/cemails.php9
-rw-r--r--www/disputes.php8
-rw-r--r--www/gpg.php38
-rw-r--r--www/index.php184
-rw-r--r--www/keygenIE.js4
-rw-r--r--www/policy/CAcertCommunityAgreement.php1087
-rw-r--r--www/stats.php5
-rw-r--r--www/styles/default.css36
-rw-r--r--www/wot.php110
10 files changed, 766 insertions, 739 deletions
diff --git a/www/api/ccsr.php b/www/api/ccsr.php
index 7efdf8d..3bfe55a 100644
--- a/www/api/ccsr.php
+++ b/www/api/ccsr.php
@@ -31,7 +31,7 @@ require_once '../../includes/lib/check_weak_key.php';
foreach($_REQUEST['email'] as $email)
{
$email = mysql_real_escape_string(trim($email));
- $query = "select * from `email` where `memid`='$memid' and `hash`='' and `deleted`=0 and `email`='$email'";
+ $query = "select * from `email` where `memid`='".intval($memid)."' and `hash`='' and `deleted`=0 and `email`='$email'";
$res = mysql_query($query);
if(mysql_num_rows($res) > 0)
{
@@ -42,7 +42,7 @@ require_once '../../includes/lib/check_weak_key.php';
}
if(count($emails) <= 0)
die("404,Wasn't able to match any emails sent against your account");
- $query = "select sum(`points`) as `points` from `notary` where `to`='$memid' group by `to`";
+ $query = "select sum(`points`) as `points` from `notary` where `to`='".intval($memid)."' and `notary`.`deleted`=0 group by `to`";
$row = mysql_fetch_assoc(mysql_query($query));
$points = $row['points'];
@@ -62,18 +62,20 @@ require_once '../../includes/lib/check_weak_key.php';
$codesign = 1;
$CSR = trim($_REQUEST['optionalCSR']);
-
+
if (($weakKey = checkWeakKeyCSR($CSR)) !== "")
{
die("403, $weakKey");
}
-
+
$incsr = tempnam("/tmp", "ccsrIn");
$checkedcsr = tempnam("/tmp", "ccsrOut");
$fp = fopen($incsr, "w");
fputs($fp, $CSR);
fclose($fp);
- $do = `/usr/bin/openssl req -in $incsr -out $checkedcsr`;
+ $incsr_esc = escapeshellarg($incsr);
+ $checkedcsr_esc = escapeshellarg($checkedcsr);
+ $do = shell_exec("/usr/bin/openssl req -in $incsr_esc -out $checkedcsr_esc");
@unlink($incsr);
if(filesize($checkedcsr) <= 0)
die("404,Invalid or missing CSR");
@@ -82,9 +84,9 @@ require_once '../../includes/lib/check_weak_key.php';
foreach($emails as $id => $email)
$csrsubject .= "/emailAddress=".$email;
- $query = "insert into `emailcerts` set `CN`='".$user['email']."', `keytype`='MS',
- `memid`='".$user['id']."', `created`=FROM_UNIXTIME(UNIX_TIMESTAMP()),
- `subject`='$csrsubject', `codesign`='$codesign'";
+ $query = "insert into `emailcerts` set `CN`='".mysql_real_escape_string($user['email'])."', `keytype`='MS',
+ `memid`='".intval($user['id'])."', `created`=FROM_UNIXTIME(UNIX_TIMESTAMP()),
+ `subject`='".mysql_real_escape_string($csrsubject)."', `codesign`='".intval($codesign)."'";
mysql_query($query);
$certid = mysql_insert_id();
$CSRname = generatecertpath("csr","client",$certid);
@@ -93,14 +95,14 @@ require_once '../../includes/lib/check_weak_key.php';
mysql_query("update `emailcerts` set `csr_name`='$CSRname' where `id`='$certid'");
foreach($emails as $emailid => $email)
- mysql_query("insert into `emaillink` set `emailcertsid`='$certid', `emailid`='$emailid'");
+ mysql_query("insert into `emaillink` set `emailcertsid`='$certid', `emailid`='".intval($emailid)."'");
- $do = `../../scripts/runclient`;
+ $do = shell_exec("../../scripts/runclient");
sleep(10); // THIS IS BROKEN AND SHOULD BE FIXED
$query = "select * from `emailcerts` where `id`='$certid' and `crt_name` != ''";
$res = mysql_query($query);
if(mysql_num_rows($res) <= 0)
- die("404,Your certificate request has failed. ID: $certid");
+ die("404,Your certificate request has failed. ID: ".intval($certid));
$cert = mysql_fetch_assoc($res);
echo "200,Authentication Ok\n";
readfile("../".$cert['crt_name']);
diff --git a/www/api/cemails.php b/www/api/cemails.php
index 0d067ea..f937069 100644
--- a/www/api/cemails.php
+++ b/www/api/cemails.php
@@ -25,7 +25,7 @@
echo "200,Authentication Ok\n";
$user = mysql_fetch_assoc($res);
$memid = $user['id'];
- $query = "select sum(`points`) as `points` from `notary` where `to`='$memid' group by `to`";
+ $query = "select sum(`points`) as `points` from `notary` where `to`='".intval($memid)."' and `notary`.`deleted`=0 group by `to`";
$row = mysql_fetch_assoc(mysql_query($query));
$points = $row['points'];
echo "CS=".intval($user['codesign'])."\n";
@@ -40,8 +40,9 @@
if($user['mname'] != "" && $user['suffix'] != "")
echo "NAME=".sanitizeHTML($user['fname'])." ".sanitizeHTML($user['mname'])." ".sanitizeHTML($user['lname'])." ".sanitizeHTML($user['suffix'])."\n";
}
- $query = "select * from `email` where `memid`='$memid' and `hash`='' and `deleted`=0";
+ $query = "select * from `email` where `memid`='".intval($memid)."' and `hash`='' and `deleted`=0";
$res = mysql_query($query);
- while($row = mysql_fetch_assoc($res))
- echo "EMAIL=".$row['email']."\n";
+ while($row = mysql_fetch_assoc($res)) {
+ echo "EMAIL=".sanitizeHTML($row['email'])."\n";
+ }
?>
diff --git a/www/disputes.php b/www/disputes.php
index 34a447a..96c7c75 100644
--- a/www/disputes.php
+++ b/www/disputes.php
@@ -18,6 +18,7 @@
<?
require_once("../includes/loggedin.php");
require_once("../includes/notary.inc.php");
+ require_once("../includes/lib/l10n.php");
loadem("account");
@@ -287,11 +288,15 @@
`IP`='".$_SERVER['REMOTE_ADDR']."'";
mysql_query($query);
+ $my_translation = L10n::get_translation();
+ L10n::set_recipient_language($oldmemid);
+
$body = sprintf(_("You have been sent this email as the email address '%s' is being disputed. You have the option to accept or reject this request, after 2 days the request will automatically be discarded. Click the following link to accept or reject the dispute:"), $email)."\n\n";
$body .= "https://".$_SESSION['_config']['normalhostname']."/disputes.php?type=email&emailid=$emailid&hash=$hash\n\n";
$body .= _("Best regards")."\n"._("CAcert.org Support!");
sendmail($email, "[CAcert.org] "._("Dispute Probe"), $body, "support@cacert.org", "", "", "CAcert Support");
+ L10n::set_translation($my_translation);
showheader(_("Email Dispute"));
printf(_("The email address '%s' has been entered into the dispute system, the email address will now be sent an email which will give the recipent the option of accepting or rejecting the request, if after 2 days we haven't received a valid response for or against we will discard the request."), sanitizeHTML($email));
@@ -447,10 +452,13 @@
$query = "insert into `disputedomain` set `domain`='$domain',`memid`='".$_SESSION['profile']['id']."',
`oldmemid`='$oldmemid',`created`=NOW(),`hash`='$hash',`id`='$domainid'";
mysql_query($query);
+ $my_translation = L10n::get_translation();
+ L10n::set_recipient_language($oldmemid);
$body = sprintf(_("You have been sent this email as the domain '%s' is being disputed. You have the option to accept or reject this request, after 2 days the request will automatically be discarded. Click the following link to accept or reject the dispute:"), $domain)."\n\n";
$body .= "https://".$_SESSION['_config']['normalhostname']."/disputes.php?type=domain&domainid=$domainid&hash=$hash\n\n";
$body .= _("Best regards")."\n"._("CAcert.org Support!");
+ L10n::set_recipient_language($my_translation);
sendmail($authaddy, "[CAcert.org] "._("Dispute Probe"), $body, "support@cacert.org", "", "", "CAcert Support");
diff --git a/www/gpg.php b/www/gpg.php
index 829bbcf..cb72475 100644
--- a/www/gpg.php
+++ b/www/gpg.php
@@ -63,12 +63,18 @@ if(0)
function verifyName($name)
{
if($name == "") return 0;
- if($name == $_SESSION['profile']['fname']." ".$_SESSION['profile']['lname']) return 1;
- if($name == $_SESSION['profile']['fname']." ".$_SESSION['profile']['mname']." ".$_SESSION['profile']['lname']) return 1;
- if($name == $_SESSION['profile']['fname']." ".$_SESSION['profile']['lname']." ".$_SESSION['profile']['suffix']) return 1;
- if($name == $_SESSION['profile']['fname']." ".$_SESSION['profile']['mname']." ".$_SESSION['profile']['lname']." ".$_SESSION['profile']['suffix']) return 1;
- return 0;
+ if(!strcasecmp($name, $_SESSION['profile']['fname']." ".$_SESSION['profile']['lname'])) return 1; // John Doe
+ if(!strcasecmp($name, $_SESSION['profile']['fname']." ".$_SESSION['profile']['mname']." ".$_SESSION['profile']['lname'])) return 1; // John Joseph Doe
+ if(!strcasecmp($name, $_SESSION['profile']['fname']." ".$_SESSION['profile']['mname'][0]." ".$_SESSION['profile']['lname'])) return 1; // John J Doe
+ if(!strcasecmp($name, $_SESSION['profile']['fname']." ".$_SESSION['profile']['mname'][0].". ".$_SESSION['profile']['lname'])) return 1; // John J. Doe
+
+ if(!strcasecmp($name, $_SESSION['profile']['fname']." ".$_SESSION['profile']['lname']." ".$_SESSION['profile']['suffix'])) return 1; // John Doe Jr.
+ if(!strcasecmp($name, $_SESSION['profile']['fname']." ".$_SESSION['profile']['mname']." ".$_SESSION['profile']['lname']." ".$_SESSION['profile']['suffix'])) return 1; //John Joseph Doe Jr.
+ if(!strcasecmp($name, $_SESSION['profile']['fname']." ".$_SESSION['profile']['mname'][0]." ".$_SESSION['profile']['lname']." ".$_SESSION['profile']['suffix'])) return 1; //John J Doe Jr.
+ if(!strcasecmp($name, $_SESSION['profile']['fname']." ".$_SESSION['profile']['mname'][0].". ".$_SESSION['profile']['lname']." ".$_SESSION['profile']['suffix'])) return 1; //John J. Doe Jr.
+
+ return 0;
}
function verifyEmail($email)
@@ -106,7 +112,7 @@ function verifyEmail($email)
clean_gpgcsr($CSR),
$gpg);
- `rm -r $tmpdir`;
+ shell_exec("rm -r $tmpdir");
}
if ($err)
@@ -187,18 +193,18 @@ function verifyEmail($email)
// Name (Comment) <Email>
if(preg_match("/^([^\(\)\[@<>]+) \(([^\(\)@<>]*)\) <([\w=\/%.-]*\@[\w.-]*|[\w.-]*\![\w=\/%.-]*)>/",$bits[9],$matches))
{
- $name=trim(hex2bin($matches[1]));
+ $name=trim(gpg_hex2bin($matches[1]));
$nocomment=0;
- $comm=trim(hex2bin($matches[2]));
- $mail=trim(hex2bin($matches[3]));
+ $comm=trim(gpg_hex2bin($matches[2]));
+ $mail=trim(gpg_hex2bin($matches[3]));
}
// Name <EMail>
elseif(preg_match("/^([^\(\)\[@<>]+) <([\w=\/%.-]*\@[\w.-]*|[\w.-]*\![\w=\/%.-]*)>/",$bits[9],$matches))
{
- $name=trim(hex2bin($matches[1]));
+ $name=trim(gpg_hex2bin($matches[1]));
$nocomment=1;
$comm="";
- $mail=trim(hex2bin($matches[2]));
+ $mail=trim(gpg_hex2bin($matches[2]));
}
// Unrecognized format
else
@@ -334,7 +340,7 @@ function verifyEmail($email)
$cmd_keyid = escapeshellarg($keyid);
- $gpg = trim(`gpg --homedir $cwd --with-colons --fixed-list-mode --list-keys $cmd_keyid 2>&1`);
+ $gpg = trim(shell_exec("gpg --homedir $cwd --with-colons --fixed-list-mode --list-keys $cmd_keyid 2>&1"));
$lines = "";
$gpgarr = explode("\n", $gpg);
foreach($gpgarr as $line)
@@ -357,13 +363,13 @@ function verifyEmail($email)
$pos = strlen($bits[9]);
}
- $name = trim(hex2bin(trim(substr($bits[9], 0, $pos))));
+ $name = trim(gpg_hex2bin(trim(substr($bits[9], 0, $pos))));
$nameok=verifyName($name);
if($nocomment == 0)
{
$pos += 2;
$pos2 = strpos($bits[9], ")");
- $comm = trim(hex2bin(trim(substr($bits[9], $pos, $pos2 - $pos))));
+ $comm = trim(gpg_hex2bin(trim(substr($bits[9], $pos, $pos2 - $pos))));
if($comm != "")
$comment[] = $comm;
$pos = $pos2 + 3;
@@ -374,7 +380,7 @@ function verifyEmail($email)
$mail="";
if (preg_match("/<([\w.-]*\@[\w.-]*)>/", $bits[9],$match)) {
//echo "Found: ".$match[1];
- $mail = trim(hex2bin($match[1]));
+ $mail = trim(gpg_hex2bin($match[1]));
}
else
{
@@ -519,7 +525,7 @@ function verifyEmail($email)
$csrname=generatecertpath("csr","gpg",$insert_id);
$cmd_keyid = escapeshellarg($keyid);
- $do=`gpg --homedir $cwd --batch --export-options export-minimal --export $cmd_keyid >$csrname`;
+ $do=shell_exec("gpg --homedir $cwd --batch --export-options export-minimal --export $cmd_keyid >$csrname");
mysql_query("update `gpg` set `csr`='$csrname' where `id`='$insert_id'");
waitForResult('gpg', $insert_id);
diff --git a/www/index.php b/www/index.php
index c7cc03e..e6fc06a 100644
--- a/www/index.php
+++ b/www/index.php
@@ -17,7 +17,7 @@
*/
require_once('../includes/lib/l10n.php');
-
+require_once('../includes/notary.inc.php');
$id = 0; if(array_key_exists("id",$_REQUEST)) $id=intval($_REQUEST['id']);
$oldid = 0; if(array_key_exists("oldid",$_REQUEST)) $oldid=intval($_REQUEST['oldid']);
@@ -125,7 +125,7 @@ require_once('../includes/lib/l10n.php');
showfooter();
exit;
}
- }
+ }
}
if($oldid == 5 && $process != "")
@@ -148,18 +148,19 @@ require_once('../includes/lib/l10n.php');
}
}
+ //client login
if($id == 4 && $_SERVER['HTTP_HOST'] == $_SESSION['_config']['securehostname'])
{
include_once("../includes/lib/general.php");
$user_id = get_user_id_from_cert($_SERVER['SSL_CLIENT_M_SERIAL'],
$_SERVER['SSL_CLIENT_I_DN_CN']);
-
+
if($user_id >= 0)
{
$_SESSION['profile'] = mysql_fetch_assoc(mysql_query(
- "select * from `users` where
+ "select * from `users` where
`id`='$user_id' and `deleted`=0 and `locked`=0"));
-
+
if($_SESSION['profile']['id'] != 0)
{
$_SESSION['profile']['loggedin'] = 1;
@@ -171,79 +172,13 @@ require_once('../includes/lib/l10n.php');
}
}
+
if($id == 4 && array_key_exists('profile',$_SESSION) && array_key_exists('loggedin',array($_SESSION['profile'])) && $_SESSION['profile']['loggedin'] == 1)
{
header("location: https://".$_SERVER['HTTP_HOST']."/account.php");
exit;
}
- function getOTP64($otp)
- {
- $lookupChar = "123456789abcdefhkmnprstuvwxyzABCDEFGHKMNPQRSTUVWXYZ=+[]&@#*!-?%:";
-
- for($i = 0; $i < 6; $i++)
- $val[$i] = hexdec(substr($otp, $i * 2, 2));
-
- $tmp1 = $val[0] >> 2;
- $OTP = $lookupChar[$tmp1 & 63];
- $tmp2 = $val[0] - ($tmp1 << 2);
- $tmp1 = $val[1] >> 4;
- $OTP .= $lookupChar[($tmp1 + $tmp2) & 63];
- $tmp2 = $val[1] - ($tmp1 << 4);
- $tmp1 = $val[2] >> 6;
- $OTP .= $lookupChar[($tmp1 + $tmp2) & 63];
- $tmp2 = $val[2] - ($tmp1 << 6);
- $OTP .= $lookupChar[$tmp2 & 63];
- $tmp1 = $val[3] >> 2;
- $OTP .= $lookupChar[$tmp1 & 63];
- $tmp2 = $val[3] - ($tmp1 << 2);
- $tmp1 = $val[4] >> 4;
- $OTP .= $lookupChar[($tmp1 + $tmp2) & 63];
- $tmp2 = $val[4] - ($tmp1 << 4);
- $tmp1 = $val[5] >> 6;
- $OTP .= $lookupChar[($tmp1 + $tmp2) & 63];
- $tmp2 = $val[5] - ($tmp1 << 6);
- $OTP .= $lookupChar[$tmp2 & 63];
-
- return $OTP;
- }
-
- function getOTP32($otp)
- {
- $lookupChar = "0123456789abcdefghkmnoprstuvwxyz";
-
- for($i = 0; $i < 7; $i++)
- $val[$i] = hexdec(substr($otp, $i * 2, 2));
-
- $tmp1 = $val[0] >> 3;
- $OTP = $lookupChar[$tmp1 & 31];
- $tmp2 = $val[0] - ($tmp1 << 3);
- $tmp1 = $val[1] >> 6;
- $OTP .= $lookupChar[($tmp1 + $tmp2) & 31];
- $tmp2 = ($val[1] - ($tmp1 << 6)) >> 1;
- $OTP .= $lookupChar[$tmp2 & 31];
- $tmp2 = $val[1] - (($val[1] >> 1) << 1);
- $tmp1 = $val[2] >> 4;
- $OTP .= $lookupChar[($tmp1 + $tmp2) & 31];
- $tmp2 = $val[2] - ($tmp1 << 4);
- $tmp1 = $val[3] >> 7;
- $OTP .= $lookupChar[($tmp1 + $tmp2) & 31];
- $tmp2 = ($val[3] - ($tmp1 << 7)) >> 2;
- $OTP .= $lookupChar[$tmp2 & 31];
- $tmp2 = $val[3] - (($val[3] - ($tmp1 << 7)) >> 2) << 2;
- $tmp1 = $val[4] >> 5;
- $OTP .= $lookupChar[($tmp1 + $tmp2) & 31];
- $tmp2 = $val[4] - ($tmp1 << 5);
- $OTP .= $lookupChar[$tmp2 & 31];
- $tmp1 = $val[5] >> 3;
- $OTP .= $lookupChar[$tmp1 & 31];
- $tmp2 = $val[5] - ($tmp1 << 3);
- $tmp1 = $val[6] >> 6;
- $OTP .= $lookupChar[($tmp1 + $tmp2) & 31];
-
- return $OTP;
- }
-
if($oldid == 4)
{
$oldid = 0;
@@ -256,70 +191,24 @@ require_once('../includes/lib/l10n.php');
$query = "select * from `users` where `email`='$email' and (`password`=old_password('$pword') or `password`=sha1('$pword') or
`password`=password('$pword')) and `verified`=1 and `deleted`=0 and `locked`=0";
$res = mysql_query($query);
- if(mysql_num_rows($res) <= 0)
- {
- $otpquery = "select * from `users` where `email`='$email' and `otphash`!='' and `verified`=1 and `deleted`=0 and `locked`=0";
- $otpres = mysql_query($otpquery);
- if(mysql_num_rows($otpres) > 0)
- {
- $otp = mysql_fetch_assoc($otpres);
- $otphash = $otp['otphash'];
- $otppin = $otp['otppin'];
- if(strlen($pword) == 6)
- {
- $matchperiod = 18;
- $time = round(gmdate("U") / 10);
- } else {
- $matchperiod = 3;
- $time = round(gmdate("U") / 60);
- }
-
- $query = "delete from `otphashes` where UNIX_TIMESTAMP(`when`) <= UNIX_TIMESTAMP(NOW()) - 600";
- mysql_query($query);
-
- $query = "select * from `otphashes` where `username`='$email' and `otp`='$pword'";
- if(mysql_num_rows(mysql_query($query)) <= 0)
- {
- $query = "insert into `otphashes` set `when`=NOW(), `username`='$email', `otp`='$pword'";
- mysql_query($query);
- for($i = $time - $matchperiod; $i <= $time + $matchperiod * 2; $i++)
- {
- if($otppin > 0)
- $tmpmd5 = md5("$i$otphash$otppin");
- else
- $tmpmd5 = md5("$i$otphash");
-
- if(strlen($pword) == 6)
- $md5 = substr(md5("$i$otphash"), 0, 6);
- else if(strlen($pword) == 8)
- $md5 = getOTP64(md5("$i$otphash"));
- else
- $md5 = getOTP32(md5("$i$otphash"));
-
- if($pword == $md5)
- $res = mysql_query($otpquery);
- }
- }
- }
- }
if(mysql_num_rows($res) > 0)
{
$_SESSION['profile'] = "";
unset($_SESSION['profile']);
$_SESSION['profile'] = mysql_fetch_assoc($res);
- $query = "update `users` set `modified`=NOW(), `password`=sha1('$pword') where `id`='".$_SESSION['profile']['id']."'";
+ $query = "update `users` set `modified`=NOW(), `password`=sha1('$pword') where `id`='".intval($_SESSION['profile']['id'])."'";
mysql_query($query);
if($_SESSION['profile']['language'] == "")
{
$query = "update `users` set `language`='".L10n::get_translation()."'
- where `id`='".$_SESSION['profile']['id']."'";
+ where `id`='".intval($_SESSION['profile']['id'])."'";
mysql_query($query);
} else {
L10n::set_translation($_SESSION['profile']['language']);
L10n::init_gettext();
}
- $query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`";
+ $query = "select sum(`points`) as `total` from `notary` where `to`='".intval($_SESSION['profile']['id'])."' and `deleted`=0 group by `to`";
$res = mysql_query($query);
$row = mysql_fetch_assoc($res);
$_SESSION['profile']['points'] = $row['total'];
@@ -331,12 +220,16 @@ require_once('../includes/lib/l10n.php');
$_SESSION['_config']['errmsg'] .= _("For your own security you must enter 5 lost password questions and answers.")."<br>";
$_SESSION['_config']['oldlocation'] = "account.php?id=13";
}
+ if (!isset($_SESSION['_config']['oldlocation'])){
+ $_SESSION['_config']['oldlocation']='';
+ }
if (checkpwlight($pword) < 3)
$_SESSION['_config']['oldlocation'] = "account.php?id=14&force=1";
- if($_SESSION['_config']['oldlocation'] != "")
+ if($_SESSION['_config']['oldlocation'] != ""){
header("location: https://".$_SERVER['HTTP_HOST']."/".$_SESSION['_config']['oldlocation']);
- else
+ }else{
header("location: https://".$_SERVER['HTTP_HOST']."/account.php");
+ }
exit;
}
@@ -351,6 +244,40 @@ require_once('../includes/lib/l10n.php');
}
}
+// check for CCA acceptance prior to login
+if ($oldid == 52 )
+{
+ // Check if the user is already authenticated
+ if (!array_key_exists('profile',$_SESSION)
+ || !array_key_exists('loggedin',$_SESSION['profile'])
+ || $_SESSION['profile']['loggedin'] != 1)
+ {
+ header("Location: https://{$_SERVER['HTTP_HOST']}/index.php?id=4");
+ exit;
+ }
+
+ if (array_key_exists('agree',$_REQUEST) && $_REQUEST['agree'] != "")
+ {
+ write_user_agreement($_SESSION['profile']['id'], "CCA", "Login acception", "", 1);
+ $_SESSION['profile']['ccaagreement']=get_user_agreement_status($_SESSION['profile']['id'],'CCA');
+
+ if (array_key_exists("oldlocation",$_SESSION['_config'])
+ && $_SESSION['_config']['oldlocation']!="")
+ {
+ header("Location: https://{$_SERVER['HTTP_HOST']}/{$_SESSION['_config']['oldlocation']}");
+ exit;
+ } else {
+ header("Location: https://{$_SERVER['HTTP_HOST']}/account.php");
+ exit;
+ }
+ }
+
+ // User didn't agree
+ header("Location: https://{$_SERVER['HTTP_HOST']}/index.php?id=4");
+ exit;
+}
+
+
if($process && $oldid == 1)
{
$id = 2;
@@ -499,7 +426,7 @@ require_once('../includes/lib/l10n.php');
if($checkemail != "OK")
{
$id = 1;
- if (substr($checkemail, 0, 1) == "4")
+ if (substr($checkemail, 0, 1) == "4")
{
$_SESSION['_config']['errmsg'] .= _("The mail server responsible for your domain indicated a temporary failure. This may be due to anti-SPAM measures, such as greylisting. Please try again in a few minutes.");
} else {
@@ -545,7 +472,6 @@ require_once('../includes/lib/l10n.php');
`regional`='".$_SESSION['signup']['regional']."',
`radius`='".$_SESSION['signup']['radius']."'";
mysql_query($query);
- include_once("../includes/notary.inc.php");
write_user_agreement($memid, "CCA", "account creation", "", 1);
$body = _("Thanks for signing up with CAcert.org, below is the link you need to open to verify your account. Once your account is verified you will be able to start issuing certificates till your hearts' content!")."\n\n";
@@ -566,9 +492,9 @@ require_once('../includes/lib/l10n.php');
$subject = stripslashes($_REQUEST['subject']);
$message = stripslashes($_REQUEST['message']);
$secrethash = $_REQUEST['secrethash2'];
-
+
//check for spam via honeypot
- if(!isset($_REQUEST['robotest']) || !empty($_REQUEST['robotest'])){
+ if(!isset($_REQUEST['robotest']) || !empty($_REQUEST['robotest'])){
echo _("Form could not be sent.");
showfooter();
exit;
@@ -641,7 +567,7 @@ require_once('../includes/lib/l10n.php');
$newUrl = $protocol . '://wiki.cacert.org/FAQ/AboutUs';
header('Location: '.$newUrl, true, 301); // 301 = Permanently Moved
}
-
+
if ($id == 19)
{
$protocol = $_SERVER['HTTPS'] ? 'https' : 'http';
@@ -655,7 +581,7 @@ require_once('../includes/lib/l10n.php');
$newUrl = $protocol . '://wiki.cacert.org/Board';
header('Location: '.$newUrl, true, 301); // 301 = Permanently Moved
}
-
+
showheader(_("Welcome to CAcert.org"));
includeit($id);
showfooter();
diff --git a/www/keygenIE.js b/www/keygenIE.js
index be2d184..4c15b23 100644
--- a/www/keygenIE.js
+++ b/www/keygenIE.js
@@ -247,6 +247,7 @@ var CAcert_keygen_IE = function () {
privateKey.Algorithm = algorithmOid;
privateKey.Length = bits;
privateKey.KeyUsage = 0xffffff; // XCN_NCRYPT_ALLOW_ALL_USAGES
+ privateKey.ExportPolicy = 0x1; // XCN_NCRYPT_ALLOW_EXPORT_FLAG
var request = factory.CreateObject("X509Enrollment.CX509CertificateRequestPkcs10");
request.InitializeFromPrivateKey(
@@ -545,7 +546,8 @@ var CAcert_keygen_IE = function () {
}
cenroll.GenKeyFlags = bits << 16; // keysize is encoded in the uper 16 bits
- //cenroll.GenKeyFlags = cenroll.GenKeyFlags | 0x1; //CRYPT_EXPORTABLE
+ // Allow exporting the private key
+ cenroll.GenKeyFlags = cenroll.GenKeyFlags | 0x1; //CRYPT_EXPORTABLE
generatingKeyNotice.style.display = "";
diff --git a/www/policy/CAcertCommunityAgreement.php b/www/policy/CAcertCommunityAgreement.php
index 3106eb1..17065f1 100644
--- a/www/policy/CAcertCommunityAgreement.php
+++ b/www/policy/CAcertCommunityAgreement.php
@@ -1,512 +1,593 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-<head><title>CAcert Community Agreement</title></head>
+<?='<?xml version="1.0" encoding="utf-8"?>'?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8" />
+ <title> CAcert Community Agreement </title>
+<style type="text/css">
+<!--
+.comment {
+ color : steelblue;
+}
+.first-does-not-work {
+ color : red;
+}
+.q {
+ color : green;
+ font-weight: bold;
+ text-align: center;
+ font-style:italic;
+}
+.change {
+ color : blue;
+ font-weight: bold;
+}
+.change2 {
+ color : blue;
+ font-weight: bold;
+}
+.change3 {
+ color : blue;
+ font-weight: bold;
+}
+.change4 {
+ color : blue;
+ font-weight: bold;
+}
+.change5 {
+ color : blue;
+ font-weight: bold;
+}
+.change6 {
+ color : blue;
+ font-weight: bold;
+}
+.change7 {
+ color : blue ;
+ font-weight: bold;
+}
+.change8 {
+ color : blue;
+ font-weight: bold;
+}
+.change9 {
+ color : blue;
+ font-weight: bold;
+}
+.change10 {
+ color : blue;
+ font-weight: bold;
+}
+.change11 {
+ color : blue;
+ font-weight: bold;
+}
+.change12 {
+ color : blue;
+ font-weight: bold;
+}
+.change13 {
+ color : blue;
+ font-weight: bold;
+}
+.strike {
+ color : blue;
+ text-decoration:line-through;
+}
+.strike2 {
+ color : blue;
+ text-decoration:line-through;
+}
+.strike4 {
+ color : blue;
+ text-decoration:line-through;
+}
+.strike5 {
+ color : blue;
+ text-decoration:line-through;
+}
+.strike6 {
+ color : blue;
+ text-decoration:line-through;
+}
+.strike7 {
+ color : blue;
+ text-decoration:line-through;
+}
+.strike8 {
+ color : blue;
+ text-decoration:line-through;
+}
+.strike9 {
+ color : blue;
+ text-decoration:line-through;
+}
+.strike10 {
+ color : blue;
+ text-decoration:line-through;
+}
+.strike11 {
+ color : blue;
+ text-decoration:line-through;
+}
+.strike12 {
+ color : blue;
+ text-decoration:line-through;
+}
+.strike13 {
+ color : blue;
+ text-decoration:line-through;
+}
+-->
+</style>
+
+</head>
<body>
+ <div class="comment">
+ <table width="100%">
+
+ <tr>
+ <td rowspan="2">
+ Name: CCA <a style="color: steelblue" href="https://svn.cacert.org/CAcert/Policies/ControlledDocumentList.html">COD9</a><br />
+ Status: POLICY <a style="color: steelblue" href="https://wiki.cacert.org/PolicyDecisions#p20080109.1_CCA_to_POLICY_status">p20080109.1</a><br />
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="draftadd">DRAFT <a style="color: steelblue" href="https://wiki.cacert.org/PolicyDecisions#p20140709_CCA_update_to_DRAFT">p20140709</a></span> <br />
+ Editor: <a style="color: steelblue" href="https://wiki.cacert.org/Community/HomePagesMembers/BenediktHeintel">Benedikt</a><br />
+ Licence: <a style="color: steelblue" href="https://wiki.cacert.org/Policy#Licence" title="this document is Copyright &copy; CAcert Inc., licensed openly under CC-by-sa with all disputes resolved under DRP. More at wiki.cacert.org/Policy">CC-by-sa+DRP</a><br />
+
+ </td>
+ <td valign="top" align="right">
+ <a href="https://www.cacert.org/policy/PolicyOnPolicy.php"><img src="images/cacert-policy.png" alt="CCA Status - POLICY" height="31" width="88" style="border-style: none;" /></a>
+
+ <!-- XXXXXXXXXXXXXX delete this going to POLICY -->
+ <br />
+ <a href="https://www.cacert.org/policy/PolicyOnPolicy.php"><img src="images/cacert-draft.png" alt="CCA Status - DRAFT" height="31" width="88" style="border-style: none;" /></a>
+
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <h2>CAcert Community Agreement</h2>
+
+ <h3><a name="0">0.</a> Introduction</h3>
+
+ <p>This agreement is between you, being a registered member ("Member") within
+ CAcert's community at large ("Community") and CAcert Incorporated ("CAcert"),
+ being an operator of services to the Community.</p>
+
+ <h4><a name="0.1">0.1</a> Terms</h4>
+
+ <ol>
+ <li>"CAcert" means CAcert Inc., a non-profit Association of Members
+ incorporated in New South Wales, Australia. Note that Association Members
+ are distinct from the Members defined here.</li>
+
+ <li>"Member" means you, a registered participant within CAcert's Community,
+ with an account on the website and the facility to request certificates.
+ Members may be individuals ("natural persons") or organisations ("legal
+ persons").</li>
+
+ <li>"Organisation" is defined under the Organisation Assurance programme,
+ and generally includes corporations and other entities that become Members
+ and become Assured.</li>
+
+ <li>"Community" means all of the Members that are registered by this
+ agreement and other parties by other agreements, all being under CAcert's
+ Arbitration.</li>
+
+ <li>"Non-Related Person" ("NRP"), being someone who is not a Member, is not
+ part of the Community, and has not registered their agreement. <span class=
+ "strike7">Such people are offered the NRP-DaL another agreement allowing
+ the USE of certificates.</span></li>
+
+ <li><span class="strike7">"Non-Related Persons - Disclaimer and Licence"
+ ("NRP-DaL"), another agreement that is offered to persons outside the
+ Community.</span><span class="change7">(withdrawn)</span></li>
+
+ <li>"Arbitration" is the Community's forum for resolving disputes, or
+ jurisdiction.</li>
+
+ <li>"Dispute Resolution Policy" ("DRP" =&gt; COD7) is the policy and rules
+ for resolving disputes.</li>
+
+ <li>"USE" means the act by your software to conduct its tasks,
+ incorporating the certificates according to software procedures.</li>
+
+ <li>"RELY" means your human act in taking on a risk and liability on the
+ basis of the claim(s) bound within a certificate.</li>
+
+ <li>"OFFER" means the your act of making available your certificate to
+ another person. Generally, you install and configure your software to act
+ as your agent and facilite this and other tasks. OFFER does not imply
+ suggestion of reliance.</li>
+
+ <li>"Issue" means creation of a certificate by CAcert. To create a
+ certificate, CAcert affixes a digital signature from the root onto a public
+ key and other information. This act would generally bind a statement or
+ claim, such as your name, to your key.</li>
+
+ <li>"Root" means CAcert's top level key, used for signing certificates for
+ Members. In this document, the term includes any subroots.</li>
+
+ <li>"CAcert Official Document" ("COD" <span class="strike4">=&gt;
+ COD3</span>) <span class="strike4">in a standard format for describing the
+ details of operation and governance essential to a certificate authority.
+ Changes are managed and controlled. CODs define more technical terms. See
+ 4.2 for listing of relevant CODs.</span> <span class="change4">is an
+ official managed and controlled document (e. g. a Policy) of
+ CAcert.</span></li>
+
+ <li>"Certification Practice Statement" ("CPS" =&gt; COD6) is the document
+ that controls details about operational matters within CAcert.</li>
+ </ol>
+
+ <h3><a name="1">1.</a> Agreement and Licence</h3>
+
+ <h4><a name="1.1">1.1</a> Agreement</h4>
+
+ <p>You <span class="strike">and CAcert both</span> agree to the terms and
+ conditions in this agreement. Your agreement is given by <span class=
+ "change2">but not limited to</span> <span class="strike2">any of</span></p>
+
+ <ul>
+ <li>your signature on a form to request assurance of identity ("CAP"
+ form),</li>
+
+ <li>your request on the website to join the Community and create an
+ account,</li>
+
+ <li>your request for Organisation Assurance,</li>
+
+ <li>your request for issuing of certificates, or</li>
+
+ <li>if you USE, RELY, or OFFER any certificate issued to you.</li>
+ </ul>
+
+ <p>Your agreement is effective from the date of the first event above that
+ makes this agreement known to you. This Agreement replaces and <span class=
+ "strike2">supercedes prior agreements, including the NRP-DaL.</span>
+ <span class="change2">supersedes any prior agreements.</span></p>
+
+ <h4><a name="1.2">1.2</a> Licence</h4>
+
+ <p>As part of the Community, CAcert offers you these rights:</p>
+
+ <ol>
+ <li>You may USE any certificates issued by CAcert.</li>
+
+ <li>You may RELY on any certificate issued by CAcert, as explained and
+ limited by CPS (COD6).</li>
+
+ <li>You may OFFER certificates issued to you by CAcert to Members for their
+ RELIANCE.</li>
+
+ <li>You may OFFER certificates issued to you by CAcert to NRPs for their
+ USE, within the general principles of the Community.</li>
+
+ <li>This Licence is free of cost, non-exclusive, and
+ non-transferrable.</li>
+ </ol>
+
+ <h4><a name="1.3">1.3</a> Your Contributions</h4>
+
+ <p>You agree to a non-exclusive non-restrictive non-revokable transfer of
+ Licence to CAcert for your contributions. That is, if you post an idea or
+ comment on a CAcert forum, or email it to other Members, your work can be
+ used freely by the Community for CAcert purposes, including placing under
+ CAcert's licences for wider publication.</p>
+
+ <p>You retain authorship rights, and the rights to also transfer
+ non-exclusive rights to other parties. That is, you can still use your ideas
+ and contributions outside the Community.</p>
+
+ <p>Note that the following exceptions override this clause:</p>
+
+ <ol>
+ <li>Contributions to controlled documents are subject to Policy on Policy
+ ("PoP" =&gt; COD1)</li>
+
+ <li>Source code is subject to an open source licence regime.</li>
+
+ <li><span class="change">Personal data</span></li>
+
+ <li><span class="change">Postings under competing licenses if clearly
+ stated when posted</span></li>
+ </ol>
+
+ <h4><a name="1.4">1.4</a> Privacy</h4>
+
+ <p>You give rights to CAcert to store, verify and
+ process and publish your data in accordance with policies in force. These
+ rights include shipping the data to foreign countries for system
+ administration, support and processing purposes. Such shipping will only be
+ done among CAcert Community administrators and Assurers.</p>
+
+ <p>Privacy is further covered in the Privacy Policy ("PP" =&gt; COD5).</p>
+
+ <h3><a name="2">2.</a> Your Risks, Liabilities and Obligations</h3>
+
+ <p>As a Member, you have risks, liabilities and obligations within this agreement.</p>
+
+ <h4><a name="2.1">2.1</a> Risks</h4>
+
+ <ol>
+ <li>A certificate may prove unreliable.</li>
+
+ <li>Your account, keys or other security tools may be
+ lost or otherwise compromised.</li>
+
+ <li>You may find yourself subject to Arbitration (DRP
+ =&gt; COD7).</li>
+ </ol>
+
+ <h4><a name="2.2">2.2</a> Liabilities</h4>
+
+ <ol>
+ <li>You are liable for any penalties as awarded
+ against you by the Arbitrator.</li>
+
+ <li>Remedies are as defined in the DRP (COD7). An
+ Arbitrator's ruling may include monetary amounts, awarded against
+ you.</li>
+
+ <li>Your liability is limited to a total maximum of
+ <b>1000 Euros</b>.</li>
+
+ <li>"Foreign Courts" may assert jurisdiction. These
+ include your local courts, and are outside our Arbitration. Foreign Courts
+ will generally refer to the Arbitration Act of their country, which will
+ generally refer civil cases to Arbitration. The Arbitration Act will not
+ apply to criminal cases.</li>
+ </ol>
+
+ <h4><a name="2.3">2.3</a> Obligations</h4>
+
+ <p>You are obliged</p>
+
+ <ol>
+ <li>to provide accurate information as part of
+ Assurance. You give permission for verification of the information using
+ CAcert-approved methods.</li>
+
+ <li>to make no false representations.</li>
+
+ <li>to submit all your disputes to Arbitration (DRP
+ =&gt; COD7).</li>
+
+ <li><span class="change">to assist the Arbitrator by truthfully providing
+ information, or with any other reasonable request.</span></li>
+
+ <li><span class="change7">to not share your CAcert account.</span></li>
+ </ol>
+
+ <h4><a name="2.4">2.4</a> Principles</h4>
+
+ <p>As a Member of CAcert, you are a member of the Community. You are further
+ obliged to work within the spirit of the Principles of the Community. These
+ are described in <a href=
+ "http://svn.cacert.org/CAcert/principles.html">Principles of the
+ Community</a>.</p>
+
+ <h4><a name="2.5">2.5</a> Security</h4>
+
+ <p>CAcert exists to help you to secure yourself. You are primarily
+ responsible for your own security. Your security obligations include</p>
+
+ <ol>
+ <li>to secure yourself and your computing platform (e. g. PC),</li>
+
+ <li>to keep your email account in good working order,</li>
+
+ <li>to secure your CAcert account (e. g., credentials such as username,
+ password),</li>
+
+ <li>to secure your private keys, <span class="change8">ensuring that they
+ are only used as indicated by the certificate, or by wider agreement with
+ others,</span></li>
+
+ <li>to review certificates for accuracy, and</li>
+
+ <li>when in doubt, notify CAcert,</li>
+
+ <li>when in doubt, take other reasonable actions, such as revoking
+ certificates, changing account credentials, and/or generating new
+ keys.</li>
+ </ol>
+
+ <p>Where, above, 'secure' means to protect to a reasonable degree, in
+ proportion with your risks and the risks of others.</p>
+
+ <h3><a name="3">3.</a> Law and Jurisdiction</h3>
+
+ <h4><a name="3.1">3.1</a> Governing Law</h4>
+
+ <p>This agreement is governed under the law of New South Wales, Australia,
+ being the home of the CAcert Inc. Association.</p>
+
+ <h4><a name="3.2">3.2</a> Arbitration as Forum of Dispute Resolution</h4>
+
+ <p>You agree, with CAcert and all of the Community, that all disputes arising
+ out of or in connection to our use of CAcert services shall be referred to
+ and finally resolved by Arbitration under the rules within the Dispute
+ Resolution Policy of CAcert (DRP =&gt; COD7). The rules select a single
+ Arbitrator chosen by CAcert from among senior Members in the Community. The
+ ruling of the Arbitrator is binding and final on Members and CAcert
+ alike.</p>
+
+ <p>In general, the jurisdiction for resolution of disputes is within CAcert's
+ own forum of Arbitration, as defined and controlled by its own rules (DRP
+ =&gt; COD7).</p>
+
+ <p>We use Arbitration for many purposes beyond the strict nature of disputes,
+ such as governance and oversight. A systems administrator may need
+ authorisation to conduct a non-routine action, and Arbitration may provide
+ that authorisation. Thus, you may find yourself party to Arbitration that is
+ simply support actions, and you may file disputes in order to initiate
+ support actions.</p>
+
+ <h4><a name="3.3">3.3</a> Termination</h4>
+
+ <p><span class="strike12">You may terminate this agreement by resigning from
+ CAcert. You may do this at any time by writing to CAcert's online support
+ forum and filing dispute to resign. All services will be terminated, and your
+ certificates will be revoked. However, some information will continue to be
+ held for certificate processing purposes.</span></p>
+
+ <p><span class="strike12">The provisions on Arbitration survive any
+ termination by you by leaving CAcert. That is, even if you resign from
+ CAcert, you are still bound by the DRP (COD7), and the Arbitrator may
+ reinstate any provision of this agreement or bind you to a ruling.</span></p>
+
+ <p><span class="strike12">Only the Arbitrator may terminate this agreement
+ with you.</span></p>
+
+ <p><span class="change12">The CAcert Community Agreement is
+ terminated</span></p>
+
+ <ol>
+ <li><span class="change12">based on a Policy Group decision following (PoP
+ =&gt; COD1). This terminates the Agreement with every member.</span></li>
+
+ <li><span class="change12">with a ruling of the Arbitrator or the
+ completion of a termination process defined by an Arbitrator ruling (DRP
+ =&gt; COD7).</span></li>
+
+ <li><span class="change12">by the end of existence of a member (i.e. death
+ in the case of individuals).</span></li>
+ </ol>
+
+ <p><span class="change12">A member may declare the wish to resign from CAcert
+ at any time by writing to <em>support AT cacert.org</em>. This triggers a
+ process for termination of this agreement with the member.</span></p>
+
+ <h4><span class="change12"><a name="3.3">3.3a</a> Consequences of
+ Termination</span></h4>
+
+ <p><span class="change12">The termination discontinues the right to USE,
+ OFFER and CREATE personal certificates in any account of the former member.
+ Those certificates will be revoked and all services to the former member will
+ be terminated as soon as possible. However, some information will continue to
+ be held for certificate processing purposes.</span></p>
+
+ <p><span class="change12">The provisions on Arbitration for the time of
+ membership survive any termination. Former members are still bound by the DRP
+ (COD7), and the Arbitrator may reinstate any provision of this agreement or
+ bind them to a ruling.</span></p>
+
+ <p><span class="change12">As far as Organisations are concerned details are
+ also defined in the Organisation Assurance Policy (OAP =&gt;
+ COD11).</span></p>
+
+ <p><span class="change12">Every member learning about the death of a member
+ or termination of existence of a member should notify <em>support AT
+ cacert.org</em>.</span></p>
+
+ <h4><a name="3.4">3.4</a> Changes of Agreement</h4>
+
+ <p>CAcert may from time to time vary the terms of this Agreement. Changes
+ will be done according to the documented CAcert policy for changing policies,
+ and is subject to scrutiny and feedback by the Community. Changes will be
+ notified to you by email to your primary address.</p>
+
+ <p>If you do not agree to the changes, you may terminate as above. Continued
+ use of the service shall be deemed to be agreement by you.</p>
+
+ <h4><a name="3.5">3.5</a> Communication</h4>
+
+ <p><span class="change6">You are responsible for keeping your primary email
+ account in good working order and able to receive emails from
+ CAcert.</span></p>
+
+ <p>Notifications to CAcert are to be sent by email to the address <em>support
+ AT cacert.org</em>. You should attach a digital signature<span class=
+ "strike6">, but need not do so in the event of security or similar
+ urgency</span>.</p>
+
+ <p><span class="strike6">Notifications to you are sent by CAcert to the
+ primary email address registered with your account. You are responsible for
+ keeping your email account in good working order and able to receive emails
+ from CAcert.</span></p>
+
+ <p><span class="strike6">Arbitration is generally conducted by
+ email.</span></p>
+
+ <h3><a name="4">4.</a> Miscellaneous</h3>
+
+ <h4><a name="4.1">4.1</a> <span class="strike10">Other Parties Within the
+ Community</span> <span class="change10">(withdrawn)</span></h4>
+
+ <p class="strike10">As well as you and other Members in the Community, CAcert
+ forms agreements with third party vendors and others. Thus, such parties will
+ also be in the Community. Such agreements are also controlled by the same
+ policy process as this agreement, and they should mirror and reinforce these
+ terms.</p>
+
+ <h4><a name="4.2">4.2</a> References and Other Binding Documents</h4>
+
+ <p class="strike11">This agreement is CAcert Official Document 9 (COD9) and
+ is a controlled document.</p>
+
+ <p>You are also bound by <span class="change11">the Policies of the Community
+ under the control of Policy on Policy ("PoP" =&gt; COD1) and listed in
+ <a href=
+ "https://svn.cacert.org/CAcert/Policies/ControlledDocumentList.html">Controlled
+ Document List</a>.</span></p>
+
+ <ol>
+ <li><span class="strike11"><a href=
+ "http://www.cacert.org/policy/CertificationPracticeStatement.php">Certification
+ Practice Statement</a> (CPS =&gt; COD6).</span></li>
+
+ <li><span class="strike11"><a href=
+ "http://www.cacert.org/policy/DisputeResolutionPolicy.php">Dispute
+ Resolution Policy</a> (DRP =&gt; COD7).</span></li>
+
+ <li><span class="strike11"><a href="PrivacyPolicy.html">Privacy Policy</a>
+ (PP =&gt; COD5).</span></li>
+
+ <li><span class="strike11"><a href=
+ "http://svn.cacert.org/CAcert/principles.html">Principles of the
+ Community</a>.</span></li>
+ </ol>
+
+ <p class="strike11">Where documents are referred to as <i>=&gt; COD x</i>,
+ they are controlled documents under the control of Policy on Policies
+ (COD1).</p>
+
+ <p class="strike11">This agreement and controlled documents above are
+ primary, and may not be replaced or waived except by formal policy channels
+ and by Arbitration.</p>
+
+ <p class="change11">Controlled documents are primary, and may not be replaced
+ or waived except by formal policy channels and Arbitration.</p>
+
+ <p class="change11">This agreement is controlled document COD9.</p>
+
+ <h4><a name="4.3">4.3</a> Informative References</h4>
+ <p>The governing documents are in English. Documents may be translated for
+ convenience. Because we cannot control the legal effect of translations, the
+ English documents are the ruling ones.</p>
+ <p class="strike9">You are encouraged to be familiar with the Assurer
+ Handbook, which provides a more readable introduction for much of the
+ information needed. The Handbook is not however an agreement, and is
+ overruled by this agreement and others listed above.</p>
-<h3> <a name="0"> 0. </a> Introduction </h3>
-
-<p>
-This agreement is between
-you, being a registered member ("Member")
-within CAcert's community at large ("Community")
-and CAcert Incorporated ("CAcert"),
-being an operator of services to the Community.
-</p>
-
-<h4> <a name="0.1"> 0.1 </a> Terms </h4>
-<ol><li>
- "CAcert"
- means CAcert Inc.,
- a non-profit Association of Members incorporated in
- New South Wales, Australia.
- Note that Association Members are distinct from
- the Members defined here.
- </li><li>
- "Member"
- means you, a registered participant within CAcert's Community,
- with an account on the website and the
- facility to request certificates.
- Members may be individuals ("natural persons")
- or organisations ("legal persons").
- </li><li>
- "Organisation"
- is defined under the Organisation Assurance programme,
- and generally includes corporations and other entities
- that become Members and become Assured.
- </li><li>
- "Community"
- means all of the Members
- that are registered by this agreement
- and other parties by other agreements,
- all being under CAcert's Arbitration.
- </li><li>
- "Non-Related Person" ("NRP"),
- being someone who is not a
- Member, is not part of the Community,
- and has not registered their agreement.
- Such people are offered the NRP-DaL
- another agreement allowing the USE of certificates.
- </li><li>
- "Non-Related Persons - Disclaimer and Licence" ("NRP-DaL"),
- another agreement that is offered to persons outside the
- Community.
- </li><li>
- "Arbitration"
- is the Community's forum for
- resolving disputes, or jurisdiction.
- </li><li>
- "Dispute Resolution Policy" ("DRP" => COD7)
- is the policy and
- rules for resolving disputes.
- </li><li>
- "USE"
- means the act by your software
- to conduct its tasks, incorporating
- the certificates according to software procedures.
- </li><li>
- "RELY"
- means your human act in taking on a
- risk and liability on the basis of the claim(s)
- bound within a certificate.
- </li><li>
- "OFFER"
- means the your act
- of making available your certificate to another person.
- Generally, you install and configure your software
- to act as your agent and facilite this and other tasks.
- OFFER does not imply suggestion of reliance.
- </li><li>
- "Issue"
- means creation of a certificate by CAcert.
- To create a certificate,
- CAcert affixes a digital signature from the root
- onto a public key and other information.
- This act would generally bind a statement or claim,
- such as your name, to your key.
- </li><li>
- "Root"
- means CAcert's top level key,
- used for signing certificates for Members.
- In this document, the term includes any subroots.
- </li><li>
- "CAcert Official Document" ("COD" => COD3)
- in a standard format for describing the details of
- operation and governance essential to a certificate authority.
- Changes are managed and controlled.
- CODs define more technical terms.
- See 4.2 for listing of relevant CODs.
- </li><li>
- "Certification Practice Statement" ("CPS" => COD6)
- is the document that controls details
- about operational matters within CAcert.
-</li></ol>
-
-
-<h3> <a name="1"> 1. </a> Agreement and Licence </h3>
-
-<h4> <a name="1.1"> 1.1 </a> Agreement </h4>
-
-<p>
-You and CAcert both agree to the terms and conditions
-in this agreement.
-Your agreement is given by any of
-</p>
-
-<ul><li>
- your signature on a form to request assurance of identity
- ("CAP" form),
- </li><li>
- your request on the website
- to join the Community and create an account,
- </li><li>
- your request for Organisation Assurance,
- </li><li>
- your request for issuing of certificates, or
- </li><li>
- if you USE, RELY, or OFFER
- any certificate issued to you.
-</li></ul>
-
-<p>
-Your agreement
-is effective from the date of the first event above
-that makes this agreement known to you.
-This Agreement
-replaces and supercedes prior agreements,
-including the NRP-DaL.
-</p>
-
-
-<h4> <a name="1.2"> 1.2 </a> Licence </h4>
-
-<p>
-As part of the Community, CAcert offers you these rights:
-</p>
-
-<ol><li>
- You may USE any certificates issued by CAcert.
- </li><li>
- You may RELY on any certificate issued by CAcert,
- as explained and limited by CPS (COD6).
- </li><li>
- You may OFFER certificates issued to you by CAcert
- to Members for their RELIANCE.
- </li><li>
- You may OFFER certificates issued to you by CAcert
- to NRPs for their USE, within the general principles
- of the Community.
- </li><li>
- This Licence is free of cost,
- non-exclusive, and non-transferrable.
-</li></ol>
-
-<h4> <a name="1.3"> 1.3 </a> Your Contributions </h4>
-
-
-<p>
-You agree to a non-exclusive non-restrictive non-revokable
-transfer of Licence to CAcert for your contributions.
-That is, if you post an idea or comment on a CAcert forum,
-or email it to other Members,
-your work can be used freely by the Community for
-CAcert purposes, including placing under CAcert's licences
-for wider publication.
-</p>
-
-<p>
-You retain authorship rights, and the rights to also transfer
-non-exclusive rights to other parties.
-That is, you can still use your
-ideas and contributions outside the Community.
-</p>
-
-<p>
-Note that the following exceptions override this clause:
-</p>
-
-<ol><li>
- Contributions to controlled documents are subject to
- Policy on Policy ("PoP" => COD1)
- </li><li>
- Source code is subject to an open source licence regime.
-</li></ol>
-
-<h4> <a name="1.4"> 1.4 </a> Privacy </h4>
-
-
-<p>
-You give rights to CAcert to store, verify and process
-and publish your data in accordance with policies in force.
-These rights include shipping the data to foreign countries
-for system administration, support and processing purposes.
-Such shipping will only be done among
-CAcert Community administrators and Assurers.
-</p>
-
-<p>
-Privacy is further covered in the Privacy Policy ("PP" => COD5).
-</p>
-
-<h3> <a name="2"> 2. </a> Your Risks, Liabilities and Obligations </h3>
-
-<p>
-As a Member, you have risks, liabilities
-and obligations within this agreement.
-</p>
-
-<h4> <a name="2.1"> 2.1 </a> Risks </h4>
-
-<ol><li>
- A certificate may prove unreliable.
- </li><li>
- Your account, keys or other security tools may be
- lost or otherwise compromised.
- </li><li>
- You may find yourself subject to Arbitration
- (DRP => COD7).
-</li></ol>
-
-<h4> <a name="2.2"> 2.2 </a> Liabilities </h4>
-
-<ol><li>
- You are liable for any penalties
- as awarded against you by the Arbitrator.
- </li><li>
- Remedies are as defined in the DRP (COD7).
- An Arbitrator's ruling may
- include monetary amounts, awarded against you.
- </li><li>
- Your liability is limited to
- a total maximum of
- <b>1000 Euros</b>.
- </li><li>
- "Foreign Courts" may assert jurisdiction.
- These include your local courts, and are outside our Arbitration.
- Foreign Courts will generally refer to the Arbitration
- Act of their country, which will generally refer
- civil cases to Arbitration.
- The Arbitration Act will not apply to criminal cases.
-</li></ol>
-
-<h4> <a name="2.3"> 2.3 </a> Obligations </h4>
-
-<p>
- You are obliged
-</p>
-
-<ol><li>
- to provide accurate information
- as part of Assurance.
- You give permission for verification of the information
- using CAcert-approved methods.
- </li><li>
- to make no false representations.
- </li><li>
- to submit all your disputes to Arbitration
- (DRP => COD7).
-</li></ol>
-
-<h4> <a name="2.4"> 2.4 </a> Principles </h4>
-
-<p>
-As a Member of CAcert, you are a member of
-the Community.
- You are further obliged to
- work within the spirit of the Principles
- of the Community.
- These are described in
- <a href="http://svn.cacert.org/CAcert/principles.html">Principles of the Community</a>.
-</p>
-
-<h4> <a name="2.5"> 2.5 </a> Security </h4>
-<p>
-CAcert exists to help you to secure yourself.
-You are primarily responsible for your own security.
-Your security obligations include
-</p>
-
-<ol><li>
- to secure yourself and your computing platform (e.g., PC),
- </li><li>
- to keep your email account in good working order,
- </li><li>
- to secure your CAcert account
- (e.g., credentials such as username, password),
- </li><li>
- to secure your private keys,
- </li><li>
- to review certificates for accuracy,
- and
- </li><li>
- when in doubt, notify CAcert,
- </li><li>
- when in doubt, take other reasonable actions, such as
- revoking certificates,
- changing account credentials,
- and/or generating new keys.
-</li></ol>
-
-<p>
-Where, above, 'secure' means to protect to a reasonable
-degree, in proportion with your risks and the risks of
-others.
-</p>
-
-<h3> <a name="3"> 3. </a> Law and Jurisdiction </h3>
-
-<h4> <a name="3.1"> 3.1 </a> Governing Law </h4>
-
-<p>
-This agreement is governed under the law of
-New South Wales, Australia,
-being the home of the CAcert Inc. Association.
-</p>
-
-<h4> <a name="3.2"> 3.2 </a> Arbitration as Forum of Dispute Resolution </h4>
-
-<p>
-You agree, with CAcert and all of the Community,
-that all disputes arising out
-of or in connection to our use of CAcert services
-shall be referred to and finally resolved
-by Arbitration under the rules within the
-Dispute Resolution Policy of CAcert
-(DRP => COD7).
-The rules select a single Arbitrator chosen by CAcert
-from among senior Members in the Community.
-The ruling of the Arbitrator is binding and
-final on Members and CAcert alike.
-</p>
-
-<p>
-In general, the jurisdiction for resolution of disputes
-is within CAcert's own forum of Arbitration,
-as defined and controlled by its own rules (DRP => COD7).
-</p>
-
-<p>
-We use Arbitration for many purposes beyond the strict
-nature of disputes, such as governance and oversight.
-A systems administrator may
-need authorisation to conduct a non-routine action,
-and Arbitration may provide that authorisation.
-Thus, you may find yourself party to Arbitration
-that is simply support actions, and you may file disputes in
-order to initiate support actions.
-</p>
-
-<h4> <a name="3.3"> 3.3 </a> Termination </h4>
-<p>
-You may terminate this agreement by resigning
-from CAcert. You may do this at any time by
-writing to CAcert's online support forum and
-filing dispute to resign.
-All services will be terminated, and your
-certificates will be revoked.
-However, some information will continue to
-be held for certificate processing purposes.
-</p>
-
-<p>
-The provisions on Arbitration survive any termination
-by you by leaving CAcert.
-That is, even if you resign from CAcert,
-you are still bound by the DRP (COD7),
-and the Arbitrator may reinstate any provision of this
-agreement or bind you to a ruling.
-</p>
-
-<p>
-Only the Arbitrator may terminate this agreement with you.
-</p>
-
-<h4> <a name="3.4"> 3.4 </a> Changes of Agreement </h4>
-
-<p>
-CAcert may from time to time vary the terms of this Agreement.
-Changes will be done according to the documented CAcert policy
-for changing policies, and is subject to scrutiny and feedback
-by the Community.
-Changes will be notified to you by email to your primary address.
-</p>
-
-<p>
-If you do not agree to the changes, you may terminate as above.
-Continued use of the service shall be deemed to be agreement
-by you.
-</p>
-
-<h4> <a name="3.5"> 3.5 </a> Communication </h4>
-
-<p>
-Notifications to CAcert are to be sent by
-email to the address
-<b>support</b> <i>at</i> CAcert.org.
-You should attach a digital signature,
-but need not do so in the event of security
-or similar urgency.
-</p>
-
-<p>
-Notifications to you are sent
-by CAcert to the primary email address
-registered with your account.
-You are responsible for keeping your email
-account in good working order and able
-to receive emails from CAcert.
-</p>
-
-<p>
-Arbitration is generally conducted by email.
-</p>
-
-<h3> <a name="4"> 4. </a> Miscellaneous </h3>
-
-<h4> <a name="4.1"> 4.1 </a> Other Parties Within the Community </h4>
-
-<p>
-As well as you and other Members in the Community,
-CAcert forms agreements with third party
-vendors and others.
-Thus, such parties will also be in the Community.
-Such agreements are also controlled by the same
-policy process as this agreement, and they should
-mirror and reinforce these terms.
-</p>
-
-
-<h4> <a name="4.2"> 4.2 </a> References and Other Binding Documents </h4>
-
-<p>
-This agreement is CAcert Official Document 9 (COD9)
-and is a controlled document.
-</p>
-
-<p>
-You are also bound by
-</p>
-
-<ol><li>
- <a href="http://www.cacert.org/policy/CertificationPracticeStatement.php">
- Certification Practice Statement</a> (CPS => COD6).
- </li><li>
- <a href="http://www.cacert.org/policy/DisputeResolutionPolicy.php">
- Dispute Resolution Policy</a> (DRP => COD7).
- </li><li>
- <a href="PrivacyPolicy.html">
- Privacy Policy</a> (PP => COD5).
- </li><li>
- <a href="http://svn.cacert.org/CAcert/principles.html">
- Principles of the Community</a>.
-</li></ol>
-
-<p>
-Where documents are referred to as <i>=> COD x</i>,
-they are controlled documents
-under the control of Policy on Policies (COD1).
-</p>
-
-<p>
-This agreement and controlled documents above are primary,
-and may not be replaced or waived except
-by formal policy channels and by Arbitration.
-</p>
-
-<h4> <a name="4.3"> 4.3 </a> Informative References </h4>
-
-<p>
-The governing documents are in English.
-Documents may be translated for convenience.
-Because we cannot control the legal effect of translations,
-the English documents are the ruling ones.
-</p>
-
-<p>
-You are encouraged to be familiar with the
-Assurer Handbook,
-which provides a more readable introduction for much of
-the information needed.
-The Handbook is not however an agreement, and is overruled
-by this agreement and others listed above.
-</p>
-
-<h4> <a name="4.4"> 4.4 </a> Not Covered in this Agreement </h4>
-
-<p>
-<b>Intellectual Property.</b>
-This Licence does not transfer any intellectual
-property rights ("IPR") to you. CAcert asserts and
-maintains its IPR over its roots, issued certificates,
-brands, logos and other assets.
-Note that the certificates issued to you
-are CAcert's intellectual property
-and you do not have rights other than those stated.
-</p>
+ <p class="change9">Beside this Agreement and the Policies, there are other
+ documents, i. e. Policy Guides, Manuals and Handbooks, supporting and
+ explaining this Agreement and the Policies. These documents are not binding
+ and in doubt this Agreement and the Policies are valid.</p>
+ <h4><a name="4.4">4.4</a> <span class="strike9">Not Covered in this
+ Agreement</span> <span class="change9">(withdrawn)</span></h4>
+ <p class="strike9"><b>Intellectual Property.</b> This Licence does not
+ transfer any intellectual property rights ("IPR") to you. CAcert asserts and
+ maintains its IPR over its roots, issued certificates, brands, logos and
+ other assets. Note that the certificates issued to you are CAcert's
+ intellectual property and you do not have rights other than those stated.</p>
</body>
</html>
diff --git a/www/stats.php b/www/stats.php
index 1599e17..d4d892d 100644
--- a/www/stats.php
+++ b/www/stats.php
@@ -32,7 +32,7 @@
$stats['timestamp'] = $ar['timestamp'];
return $stats;
}
-
+
return null;
}
@@ -40,7 +40,7 @@
if ($stats === null) {
echo '<p>', _("Error while retrieving the statistics!"), '</p>';
showfooter();
- die();
+ die();
}
?>
<h1>CAcert.org <?=_("Statistics")?></h1>
@@ -157,4 +157,3 @@
</div>
<? showfooter(); ?>
-
diff --git a/www/styles/default.css b/www/styles/default.css
index 4d4db6a..4ddfbba 100644
--- a/www/styles/default.css
+++ b/www/styles/default.css
@@ -14,7 +14,7 @@ body {
margin: 0px;
padding: 0px;
background: #cccccc;
-/* url("/siteimages/bg_grad.jpg") fixed; */
+/* url("/siteimages/bg_grad.jpg") fixed; */
}
@@ -94,6 +94,14 @@ ul.no_indent {
padding: 0px;
}
+.attach_ul {
+ margin-bottom: 0px;
+}
+
+.attach_ul + ul {
+ margin-top: 0px;
+}
+
/***********************************************/
/* Layout Divs */
@@ -219,7 +227,7 @@ ul.no_indent {
}
#globalNav img {
- margin-bottom: -4px;
+ margin-bottom: -4px;
}
#gnl {
@@ -414,10 +422,6 @@ a.glink:hover {
color: #000000;
}
-.story p {
- padding: 0px 0px 10px 0px;
-}
-
.story a.capsule {
font: bold 1em Arial,sans-serif;
color: #005FA9;
@@ -558,6 +562,19 @@ td.storyLeft {
border-right: 1px #cfcfcf solid;
}
+.DataTDError {
+ border-style: inset;
+ border-width: 1px;
+ font-size: 8pt;
+ color: #ff0000;
+ font-family: Arial, Tahoma, Verdana, Helvetica, sans-serif;
+
+ background: #ffffff;
+ padding: 1px 5px 1px 5px;
+ border: 1px #cfcfcf solid;
+ border-left: 1px #cfcfcf dotted;
+ border-right: 1px #cfcfcf dotted;
+}
.wrapper {
border-collapse: collapse;
font-family: verdana, sans-serif;
@@ -571,7 +588,12 @@ td.greytxt {
text-align: right;
vertical-align: bottom;
}
-
+.bold, .primaryemailaddress {
+ font-weight:bold;
+}
+.italic, .deletedemailaddress {
+ font-style:italic;
+}
.title {
background: #e2e2e2;
font-weight: bold;
diff --git a/www/wot.php b/www/wot.php
index 8395a58..35dce1f 100644
--- a/www/wot.php
+++ b/www/wot.php
@@ -21,7 +21,6 @@ require_once("../includes/lib/l10n.php");
require_once("../includes/notary.inc.php");
-
function show_page($target,$message,$error)
{
showheader(_("My CAcert.org Account!"));
@@ -133,9 +132,9 @@ function send_reminder()
//This mail does not need to be translated
$body = "Hi TTP adminstrators,\n\n";
$body .= "User ".$_SESSION['profile']['fname']." ".
- $_SESSION['profile']['lname']." with email address '".
- $_SESSION['profile']['email']."' is requesting a TTP assurances for ".
- mysql_escape_string(stripslashes($_POST['country'])).".\n\n";
+ $_SESSION['profile']['lname']." with email address '".
+ $_SESSION['profile']['email']."' is requesting a TTP assurances for ".
+ mysql_escape_string(stripslashes($_POST['country'])).".\n\n";
if ($_POST['ttptopup']=='1') {
$body .= "The user is also requesting TTP TOPUP.\n\n";
}else{
@@ -198,6 +197,17 @@ function send_reminder()
show_page("EnterEmail","",_("User is not yet verified. Please try again in 24 hours!"));
exit;
}
+ if ($_SESSION['profile']['ttpadmin'] != 1) {
+ $_SESSION['assuresomeone']['year'] = intval($_POST['year']);
+ $_SESSION['assuresomeone']['month'] = intval($_POST['month']);
+ $_SESSION['assuresomeone']['day'] = intval($_POST['day']);
+ $dob = sprintf('%04d-%02d-%02d', $_SESSION['assuresomeone']['year'], $_SESSION['assuresomeone']['month'], $_SESSION['assuresomeone']['day']);
+
+ if ( $_SESSION['_config']['notarise']['dob'] != $dob) {
+ show_page("EnterEmail","",_("The data entered is not matching with an account."));
+ exit;
+ }
+ }
}
$query = "select * from `users` where `email`='".mysql_escape_string(stripslashes($_POST['email']))."' and `locked`=1";
$res = mysql_query($query);
@@ -224,8 +234,8 @@ function send_reminder()
exit;
}
- $query = "select * from `notary` where `from`='".$_SESSION['profile']['id']."' and
- `to`='".$_SESSION['_config']['notarise']['id']."'";
+ $query = "select * from `notary` where `from`='".intval($_SESSION['profile']['id'])."' and
+ `to`='".intval($_SESSION['_config']['notarise']['id'])."' and `deleted` = 0";
$res = mysql_query($query);
if(mysql_num_rows($res) > 0)
{
@@ -236,7 +246,7 @@ function send_reminder()
if($oldid == 6)
{
-$iecho= "c";
+ $iecho= "c";
//date checks
if(trim($_REQUEST['date']) == '')
{
@@ -310,10 +320,10 @@ $iecho= "c";
exit;
}
- $query = "select * from `users` where `id`='".$_SESSION['_config']['notarise']['id']."'";
+ $query = "select * from `users` where `id`='".intval($_SESSION['_config']['notarise']['id'])."'";
$res = mysql_query($query);
$row = mysql_fetch_assoc($res);
- $name = $row['fname']." ".$row['mname']." ".$row['lname']." ".$row['suffix'];
+ $name = sanitizeHTML($row['fname'])." ".sanitizeHTML($row['mname'])." ".sanitizeHTML($row['lname'])." ".sanitizeHTML($row['suffix']);
if($_SESSION['_config']['wothash'] != md5($name."-".$row['dob']) || $_SESSION['_config']['wothash'] != $_REQUEST['pagehash'])
{
show_page("VerifyData","",_("Race condition discovered, user altered details during assurance procedure. PLEASE MAKE SURE THE NEW DETAILS BELOW MATCH THE ID DOCUMENTS."));
@@ -332,7 +342,7 @@ $iecho= "c";
if($newpoints < 0)
$newpoints = $awarded = 0;
- $query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['_config']['notarise']['id']."' group by `to`";
+ $query = "select sum(`points`) as `total` from `notary` where `to`='".intval($_SESSION['_config']['notarise']['id'])."' and `deleted` = 0 group by `to`";
$res = mysql_query($query);
$drow = mysql_fetch_assoc($res);
@@ -345,14 +355,15 @@ $iecho= "c";
if($newpoints < 0)
$newpoints = 0;
- if(mysql_escape_string(stripslashes($_POST['date'])) == "")
+ if(mysql_real_escape_string(stripslashes($_POST['date'])) == "")
$_POST['date'] = date("Y-m-d H:i:s");
- $query = "select * from `notary` where `from`='".$_SESSION['profile']['id']."' AND
- `to`='".$_SESSION['_config']['notarise']['id']."' AND
- `awarded`='$awarded' AND
- `location`='".mysql_escape_string(stripslashes($_POST['location']))."' AND
- `date`='".mysql_escape_string(stripslashes($_POST['date']))."'";
+ $query = "select * from `notary` where `from`='".intval($_SESSION['profile']['id'])."' AND
+ `to`='".intval($_SESSION['_config']['notarise']['id'])."' AND
+ `awarded`='".intval($awarded)."' AND
+ `location`='".mysql_real_escape_string(stripslashes($_POST['location']))."' AND
+ `date`='".mysql_real_escape_string(stripslashes($_POST['date']))."' AND
+ `deleted`=0";
$res = mysql_query($query);
if(mysql_num_rows($res) > 0)
{
@@ -363,15 +374,16 @@ $iecho= "c";
if($oldid == 6)
{
- $query = "insert into `notary` set `from`='".$_SESSION['profile']['id']."',
- `to`='".$_SESSION['_config']['notarise']['id']."',
- `points`='$newpoints', `awarded`='$awarded',
- `location`='".mysql_escape_string(stripslashes($_POST['location']))."',
- `date`='".mysql_escape_string(stripslashes($_POST['date']))."',
+ $query = "insert into `notary` set `from`='".intval($_SESSION['profile']['id'])."',
+ `to`='".intval($_SESSION['_config']['notarise']['id'])."',
+ `points`='".intval($newpoints)."', `awarded`='".intval($awarded)."',
+ `location`='".mysql_real_escape_string(stripslashes($_POST['location']))."',
+ `date`='".mysql_real_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']);
+ write_user_agreement($_SESSION['profile']['id'], "CCA", "assurance", "Assuring", 1, $_SESSION['_config']['notarise']['id']);
+ write_user_agreement($_SESSION['_config']['notarise']['id'], "CCA", "assurance", "Being assured", 0, $_SESSION['profile']['id']);
}
if($_SESSION['profile']['ttpadmin'] == 1 && ($_POST['method'] == 'Trusted 3rd Parties' || $_POST['method'] == 'Trusted Third Parties')) {
$query .= ",\n`method`='TTP-Assisted'";
@@ -379,10 +391,6 @@ $iecho= "c";
mysql_query($query);
fix_assurer_flag($_SESSION['_config']['notarise']['id']);
include_once("../includes/notary.inc.php");
-/*to be activated after CCA accept option is implemented in form
- write_user_agreement($_SESSION['profile']['id'], "CCA", "assurance", "Assuring", 1, $_SESSION['_config']['notarise']['id']);}*/
-/* to be activated after the CCA recording is announced
- write_user_agreement($_SESSION['_config']['notarise']['id'], "CCA", "assurance", "Being assured", 0, $_SESSION['profile']['id']); */
if($_SESSION['profile']['points'] < 150)
{
@@ -391,11 +399,11 @@ $iecho= "c";
$addpoints = 2;
else if($_SESSION['profile']['points'] == 149 && $_SESSION['profile']['points'] >= 100)
$addpoints = 1;
- $query = "insert into `notary` set `from`='".$_SESSION['profile']['id']."',
- `to`='".$_SESSION['profile']['id']."',
- `points`='$addpoints', `awarded`='$addpoints',
- `location`='".mysql_escape_string(stripslashes($_POST['location']))."',
- `date`='".mysql_escape_string(stripslashes($_POST['date']))."',
+ $query = "insert into `notary` set `from`='".intval($_SESSION['profile']['id'])."',
+ `to`='".intval($_SESSION['profile']['id'])."',
+ `points`='".intval($addpoints)."', `awarded`='".intval($addpoints)."',
+ `location`='".mysql_real_escape_string(stripslashes($_POST['location']))."',
+ `date`='".mysql_real_escape_string(stripslashes($_POST['date']))."',
`method`='Administrative Increase',
`when`=NOW()";
mysql_query($query);
@@ -445,35 +453,7 @@ $iecho= "c";
sendmail($_SESSION['profile']['email'], "[CAcert.org] "._("You've Assured Another Member."), $body, "support@cacert.org", "", "", "CAcert Support");
- showheader(_("My CAcert.org Account!"));
- echo "<p>"._("Shortly you and the person you were assuring will receive an email confirmation. There is no action on your behalf required to complete this.")."</p>";
-?><form method="post" action="wot.php">
-<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
- <tr>
- <td colspan="2" class="title"><?=_("Assure Someone")?></td>
- </tr>
- <tr>
- <td class="DataTD"><?=_("Email")?>:</td>
- <td class="DataTD"><input type="text" name="email" id="email" value=""></td>
- </tr>
- <tr>
- <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Next")?>"></td>
- </tr>
-</table>
-<input type="hidden" name="oldid" value="5">
-</form>
-<SCRIPT LANGUAGE="JavaScript">
-//<![CDATA[
- function my_init()
- {
- document.getElementById("email").focus();
- }
-
- window.onload = my_init();
-//]]>
-</script>
-<?
- showfooter();
+ show_page('EnterEmail', _("Shortly you and the person you were assuring will receive an email confirmation. There is no action on your behalf required to complete this."));
exit;
}
@@ -481,7 +461,7 @@ $iecho= "c";
{
csrf_check("chgcontact");
- $info = mysql_escape_string(strip_tags(stripslashes($_POST['contactinfo'])));
+ $info = mysql_real_escape_string(strip_tags(stripslashes($_POST['contactinfo'])));
$listme = intval($_POST['listme']);
if($listme < 0 || $listme > 1)
$listme = 0;
@@ -489,7 +469,7 @@ $iecho= "c";
$_SESSION['profile']['listme'] = $listme;
$_SESSION['profile']['contactinfo'] = $info;
- $query = "update `users` set `listme`='$listme',`contactinfo`='$info' where `id`='".$_SESSION['profile']['id']."'";
+ $query = "update `users` set `listme`='$listme',`contactinfo`='$info' where `id`='".intval($_SESSION['profile']['id'])."'";
mysql_query($query);
showheader(_("My CAcert.org Account!"));
@@ -510,9 +490,9 @@ $iecho= "c";
$body = $_REQUEST['message'];
$subject = $_REQUEST['subject'];
$userid = intval($_REQUEST['userid']);
- $user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='$userid' and `listme`=1"));
+ $user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($userid)."' and `listme`=1"));
$points = mysql_num_rows(mysql_query("select sum(`points`) as `total` from `notary`
- where `to`='".$user['id']."' group by `to` HAVING SUM(`points`) > 0"));
+ where `to`='".intval($user['id'])."' and `deleted` = 0 group by `to` HAVING SUM(`points`) > 0"));
if($points > 0)
{
$my_translation = L10n::get_translation();
@@ -548,7 +528,7 @@ $iecho= "c";
showheader(_("My CAcert.org Account!"));?>
<p>
- <? printf(_("Your email has been sent to %s."), $user['fname']); ?>
+ <? printf(_("Your email has been sent to %s."), sanitizeHTML($user['fname'])); ?>
</p>
<p>[ <a href='javascript:history.go(-2)'><?= _("Go Back") ?></a> ]</p>
<?