diff --git a/pages/account/15.php b/pages/account/15.php index 21757af..6cd3115 100644 --- a/pages/account/15.php +++ b/pages/account/15.php @@ -16,9 +16,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ ?> - $certid = $_SESSION[_config][cert]; + $certid = 0; if(array_key_exists('cert',$_REQUEST)) $certid=intval($_REQUEST['cert']); + $query = "select * from `domaincerts`,`domains` where `domaincerts`.`id`='$certid' and - `domains`.`memid`='".$_SESSION[profile][id]."' and + `domains`.`memid`='".intval($_SESSION['profile']['id'])."' and `domains`.`id`=`domaincerts`.`domid`"; $res = mysql_query($query); if(mysql_num_rows($res) <= 0) @@ -28,8 +29,8 @@ exit; } $row = mysql_fetch_assoc($res); - - $cert = `/usr/bin/openssl x509 -in $row[crt_name]`; + $crtname=escapeshellarg($row['crt_name']); + $cert = `/usr/bin/openssl x509 -in $crtname`; ?>
diff --git a/pages/account/19.php b/pages/account/19.php index 6e90525..9ad474d 100644 --- a/pages/account/19.php +++ b/pages/account/19.php @@ -16,9 +16,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ ?> - $certid = intval($cert); + $certid = 0; if(array_key_exists('cert',$_REQUEST)) $certid=intval($_REQUEST['cert']); + $query = "select * from `orgemailcerts`,`org` where `orgemailcerts`.`id`='$certid' and - `org`.`memid`='".$_SESSION[profile][id]."' and + `org`.`memid`='".intval($_SESSION['profile']['id'])."' and `org`.`orgid`=`orgemailcerts`.`orgid`"; $res = mysql_query($query); if(mysql_num_rows($res) <= 0) @@ -29,8 +30,8 @@ exit; } $row = mysql_fetch_assoc($res); - - $cert = `/usr/bin/openssl x509 -in $row[crt_name]`; + $crtname=escapeshellarg($row['crt_name']); + $cert = `/usr/bin/openssl x509 -in $crtname`; if($row[keytype] == "NS") { @@ -38,7 +39,7 @@ { header("Content-Type: application/x-x509-user-cert"); header("Content-Length: ".strlen($cert)); - header('Content-Disposition: inline; filename="'.$row[CN].'.crt"'); + header('Content-Disposition: inline; filename="'.$row['CN'].'.crt"'); echo $cert; exit; } else { diff --git a/pages/account/23.php b/pages/account/23.php index e0ed2fb..4ec56c3 100644 --- a/pages/account/23.php +++ b/pages/account/23.php @@ -16,9 +16,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ ?> - $certid = $_SESSION[_config][cert]; + $certid = 0; if(array_key_exists('cert',$_REQUEST)) $certid=intval($_REQUEST['cert']); + $query = "select * from `orgdomaincerts`,`org` where `orgdomaincerts`.`id`='$certid' and - `org`.`memid`='".$_SESSION[profile][id]."' and + `org`.`memid`='".intval($_SESSION['profile']['id'])."' and `org`.`orgid`=`orgdomaincerts`.`orgid`"; $res = mysql_query($query); if(mysql_num_rows($res) <= 0) @@ -28,8 +29,8 @@ exit; } $row = mysql_fetch_assoc($res); - - $cert = `/usr/bin/openssl x509 -in $row[crt_name]`; + $crtname=escapeshellarg($row['crt_name']); + $cert = `/usr/bin/openssl x509 -in $crtname`; ?>=_("Below is your Server Certificate")?>
diff --git a/pages/account/24.php b/pages/account/24.php index 6e837c0..190a046 100644 --- a/pages/account/24.php +++ b/pages/account/24.php @@ -22,27 +22,27 @@=_("Organisation Name")?>: -+ =_("Contact Email")?>: -+ =_("Town/Suburb")?>: -+ =_("State/Province")?>: -+ =_("Country")?>: -+ =_("Comments")?>: -+ "> diff --git a/pages/account/6.php b/pages/account/6.php index e20685e..151e04f 100644 --- a/pages/account/6.php +++ b/pages/account/6.php @@ -16,7 +16,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ ?> - $certid = intval($cert); + $certid = 0; if(array_key_exists('cert',$_REQUEST)) $certid=intval($_REQUEST['cert']); + $query = "select * from `emailcerts` where `id`='$certid' and `memid`='".intval($_SESSION['profile']['id'])."'"; $res = mysql_query($query); if(mysql_num_rows($res) <= 0) @@ -28,7 +29,8 @@ } $row = mysql_fetch_assoc($res); - $cert = `/usr/bin/openssl x509 -in $row[crt_name]`; + $crtname=escapeshellarg($row['crt_name']); + $cert = `/usr/bin/openssl x509 -in $crtname`; if($row['keytype'] == "NS") { @@ -36,7 +38,7 @@ { header("Content-Type: application/x-x509-user-cert"); header("Content-Length: ".strlen($cert)); - header('Content-Disposition: inline; filename="'.$row[CN].'.crt"'); + header('Content-Disposition: inline; filename="'.$row['CN'].'.crt"'); echo $cert; exit; } else {