Subject: [PATCH] Use integer values for type when inserting into orgdomaincerts
---
Index: includes/account.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/includes/account.php b/includes/account.php
--- a/includes/account.php	(revision 05b03d6cb5196f296abde465e3d2ecf1395bc132)
+++ b/includes/account.php	(date 1688912843479)
@@ -1964,8 +1964,8 @@
 
 		$csrsubject .= buildSubjectFromSession();
 
-		$type="";
-		if($_REQUEST["ocspcert"]!="" && $_SESSION['profile']['admin'] == 1) $type="8";
+		$type=0;
+		if($_REQUEST["ocspcert"]!="" && $_SESSION['profile']['admin'] == 1) $type=8;
 		if($_SESSION['_config']['rootcert'] < 1 || $_SESSION['_config']['rootcert'] > 2)
 			$_SESSION['_config']['rootcert'] = 1;
 
@@ -1978,7 +1978,7 @@
 					`subject`='".mysql_real_escape_string($csrsubject)."',
 					`rootcert`='".intval($_SESSION['_config']['rootcert'])."',
 					`md`='".mysql_real_escape_string($_SESSION['_config']['hash_alg'])."',
-					`type`='".$type."',
+					`type`=$type,
 					`description`='".mysql_real_escape_string($_SESSION['_config']['description'])."'";
 		} else {
 			$query = "insert into `orgdomaincerts` set
@@ -1988,7 +1988,7 @@
 					`subject`='".mysql_real_escape_string($csrsubject)."',
 					`rootcert`='".intval($_SESSION['_config']['rootcert'])."',
 					`md`='".mysql_real_escape_string($_SESSION['_config']['hash_alg'])."',
-					`type`='".$type."',
+					`type`=$type,
 					`description`='".mysql_real_escape_string($_SESSION['_config']['description'])."'";
 		}
 		mysql_query($query);
