Fixed some merge errors
authorBernhard Fröhlich <ted@test.cacert.org>
Mon, 19 Nov 2018 22:28:05 +0000 (22:28 +0000)
committerBernhard Fröhlich <ted@test.cacert.org>
Mon, 19 Nov 2018 22:28:05 +0000 (22:28 +0000)
includes/account.php
includes/notary.inc.php

index f82e647..e158c2c 100644 (file)
@@ -914,8 +914,8 @@ function buildSubjectFromSession() {
                                                `rootcert`='".intval($row['rootcert'])."',
                                                `type`='".intval($row['type'])."',
                                                `pkhash`='".mysqli_real_escape_string($_SESSION['mconn'], $row['pkhash'])."',
+                                               `md`='".HashAlgorithms::clean($row['md'])."', 
                                                `description`='".mysqli_real_escape_string($_SESSION['mconn'], $row['description'])."'";
-                                               `md`='".HashAlgorithms::clean($row['md'])."'";
                                mysqli_query($_SESSION['mconn'],$query);
                                $newid = mysqli_insert_id($_SESSION['mconn']);
                                $newfile=generatecertpath("csr","server",$newid);
@@ -1095,8 +1095,8 @@ function buildSubjectFromSession() {
                                                `disablelogin`='".intval($row['disablelogin'])."',
                                                `codesign`='".intval($row['codesign'])."',
                                                `rootcert`='".intval($row['rootcert'])."',
+                                               `md`='".HashAlgorithms::clean($row['md'])."',
                                                `description`='".mysqli_real_escape_string($_SESSION['mconn'], $row['description'])."'";
-                                               `md`='".HashAlgorithms::clean($row['md'])."'";
                                mysqli_query($_SESSION['mconn'],$query);
                                $newid = mysqli_insert_id($_SESSION['mconn']);
                                $newfile=generatecertpath("csr","client",$newid);
@@ -1735,8 +1735,8 @@ function buildSubjectFromSession() {
                                                `modified`=NOW(),
                                                `codesign`='".intval($row['codesign'])."',
                                                `rootcert`='".intval($row['rootcert'])."',
+                                               `md`='".HashAlgorithms::clean($row['md'])."',
                                                `description`='".mysqli_real_escape_string($_SESSION['mconn'], $row['description'])."'";
-                                               `md`='".HashAlgorithms::clean($row['md'])."'";
                                mysqli_query($_SESSION['mconn'],$query);
                                $newid = mysqli_insert_id($_SESSION['mconn']);
                                $newfile=generatecertpath("csr","orgclient",$newid);
@@ -2088,8 +2088,8 @@ function buildSubjectFromSession() {
                                                `subject`='".mysqli_real_escape_string($_SESSION['mconn'], $row['subject'])."',
                                                `type`='".intval($row['type'])."',
                                                `rootcert`='".intval($row['rootcert'])."',
+                                               `md`='".HashAlgorithms::clean($row['md'])."',
                                                `description`='".mysqli_real_escape_string($_SESSION['mconn'], $row['description'])."'";
-                                               `md`='".HashAlgorithms::clean($row['md'])."'";
                                mysqli_query($_SESSION['mconn'],$query);
                                $newid = mysqli_insert_id($_SESSION['mconn']);
                                //echo "NewID: $newid<br/>\n";
index f931bd8..b6cee0f 100644 (file)
@@ -1666,6 +1666,7 @@ function write_se_log($uid, $adminid, $type, $info, $typeid=1){
        $info = mysqli_real_escape_string($_SESSION['mconn'], g($info);
        $typeid = intval($typeid);
        $query="insert into `adminlog` (`when`, `uid`, `adminid`,`type`,`information`,`actiontypeid`) values
+                 (Now(), $uid, $adminid, '$type', '$info')";
        return mysqli_query($_SESSION['mconn'], $query);
 }