From b9f313bdc4992f64ed82ae998293df1e1626a4ff Mon Sep 17 00:00:00 2001
From: A. Täffner <darkalex@firesplash.de>
Date: Fri, 22 Jan 2016 13:14:39 -0500
Subject: [PATCH] DNSSEC-Switch: Implementation finished, tested And found a small bug (privkeys were not deleted on zone deletion) which is now fixed Testing successful. Doing last test then if everything goes well this will be the new merge request
---
interface/lib/classes/remote.d/admin.inc.php | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/interface/lib/classes/remote.d/admin.inc.php b/interface/lib/classes/remote.d/admin.inc.php
index d6a2146..2541ca5 100644
--- a/interface/lib/classes/remote.d/admin.inc.php
+++ b/interface/lib/classes/remote.d/admin.inc.php
@@ -60,21 +60,21 @@
switch($key) {
case 'sys_userid':
// check if userid is valid
- $check = $app->db->queryOneRecord('SELECT userid FROM sys_user WHERE userid = ' . $app->functions->intval($value));
+ $check = $app->db->queryOneRecord('SELECT userid FROM sys_user WHERE userid = ?', $app->functions->intval($value));
if(!$check || !$check['userid']) {
$this->server->fault('invalid parameters', $value . ' is no valid sys_userid.');
return false;
}
- $value = $app->functions->intval($value);
+ $permissions[$key] = $app->functions->intval($value);
break;
case 'sys_groupid':
// check if groupid is valid
- $check = $app->db->queryOneRecord('SELECT groupid FROM sys_group WHERE groupid = ' . $app->functions->intval($value));
+ $check = $app->db->queryOneRecord('SELECT groupid FROM sys_group WHERE groupid = ?', $app->functions->intval($value));
if(!$check || !$check['groupid']) {
$this->server->fault('invalid parameters', $value . ' is no valid sys_groupid.');
return false;
}
- $value = $app->functions->intval($value);
+ $permissions[$key] = $app->functions->intval($value);
break;
case 'sys_perm_user':
case 'sys_perm_group':
@@ -90,7 +90,7 @@
if(strpos($value, 'i') !== false) $newvalue .= 'i';
if(strpos($value, 'u') !== false) $newvalue .= 'u';
if(strpos($value, 'd') !== false) $newvalue .= 'd';
- $value = $newvalue;
+ $permissions[$key] = $newvalue;
unset($newvalue);
break;
--
Gitblit v1.9.1