You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
61
+
$client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
62
62
63
63
// Check if the user may add another record.
64
64
if($client["limit_dns_record"] >= 0) {
65
-
$tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = $client_group_id");
65
+
$tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id);
$client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
86
+
$client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
$check=$app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = ".$this->dataRecord["zone"]." AND type = '".$this->dataRecord["type"]."' AND data ='".$this->dataRecord["data"]."' AND name = '".$this->dataRecord['name']."'");
109
+
$check=$app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = ? AND type = ? AND data = ? AND name = ?", $this->dataRecord['zone'], $this->dataRecord['type'], $this->dataRecord['data'], $this->dataRecord['name']);
110
110
if ($check!='') $app->tform->errorMessage .= $app->tform->wordbook["record_exists_txt"];
111
111
if (empty($this->dataRecord['data'])) $app->tform->errorMessage .= $app->tform->wordbook["dkim_disabled_txt"];
112
112
parent::onSubmit();
@@ -116,7 +116,7 @@ function onAfterInsert() {
116
116
global$app, $conf;
117
117
118
118
//* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record
119
-
$soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = '".$app->functions->intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
119
+
$soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->intval($this->dataRecord['zone']));
$soa = $app->db->queryOneRecord("SELECT serial FROM dns_soa WHERE id = '".$app->functions->intval($this->dataRecord["zone"])."' AND ".$app->tform->getAuthSQL('r'));
132
+
$soa = $app->db->queryOneRecord("SELECT serial FROM dns_soa WHERE id = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->intval($this->dataRecord["zone"]));
Copy file name to clipboardExpand all lines: interface/web/dns/dns_dkim_get.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -82,9 +82,9 @@ function pub_key($pubkey) {
82
82
83
83
if (ctype_digit($_POST['zone'])) {
84
84
// Get the parent soa record of the domain
85
-
$soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = '".$app->db->quote($_POST['zone'])."' AND ".$app->tform->getAuthSQL('r'));
85
+
$soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND ".$app->tform->getAuthSQL('r'), $_POST['zone']);
86
86
87
-
$public_key=$app->db->queryOneRecord("SELECT dkim_public FROM mail_domain WHERE domain = '".substr_replace($soa['origin'],'',-1)."' AND dkim = 'Y' AND ".$app->tform->getAuthSQL('r'));
87
+
$public_key=$app->db->queryOneRecord("SELECT dkim_public FROM mail_domain WHERE domain = ? AND dkim = 'Y' AND ".$app->tform->getAuthSQL('r'), substr_replace($soa['origin'],'',-1));
Copy file name to clipboardExpand all lines: interface/web/dns/dns_wizard.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -248,7 +248,7 @@
248
248
$public_key=$app->db->queryOneRecord("SELECT dkim_public FROM mail_domain WHERE domain = '".$app->db->quote($_POST['domain'])."' AND dkim = 'y' AND ".$app->tform->getAuthSQL('r'));
249
249
if ($public_key!='') {
250
250
$dns_record=str_replace(array("\r\n", "\n", "\r", "-----BEGIN PUBLIC KEY-----", "-----END PUBLIC KEY-----"), '', $public_key['dkim_public']);
$client = $app->db->queryOneRecord("SELECT db_servers FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
76
+
$client = $app->db->queryOneRecord("SELECT db_servers FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
77
77
78
78
// Set the webserver to the default server of the client
79
79
$tmp = $app->db->queryAllRecords("SELECT server_id, server_name FROM server WHERE server_id IN ($client[db_servers])");
$tmp = $app->db->queryOneRecord("SELECT sum(database_quota) as db_quota FROM web_database WHERE sys_groupid = ? AND database_name <> ?", $client_group_id, $dbname_prefix.$this->dataRecord['database_name']);
0 commit comments