From 4f1e6a27ed7712eceade6f17f66c54dc87db5ea9 Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Thu, 14 Aug 2014 02:39:50 -0400 Subject: [PATCH] FS#3601 - Stop creating .htaccess files for NginX sites --- server/plugins-available/shelluser_jailkit_plugin.inc.php | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php index 90ed677..9cf6fc8 100755 --- a/server/plugins-available/shelluser_jailkit_plugin.inc.php +++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php @@ -74,6 +74,13 @@ $app->uses('system'); $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$data['new']['parent_domain_id']); + if(!$app->system->is_allowed_user($data['new']['username'], false, false) + || !$app->system->is_allowed_user($data['new']['puser'], true, true) + || !$app->system->is_allowed_group($data['new']['pgroup'], true, true)) { + $app->log('Shell user must not be root or in group root.',LOGLEVEL_WARN); + return false; + } + if($app->system->is_user($data['new']['puser'])) { // Get the UID of the parent user $uid = intval($app->system->getuid($data['new']['puser'])); @@ -139,6 +146,13 @@ $app->uses('system'); $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$data['new']['parent_domain_id']); + if(!$app->system->is_allowed_user($data['new']['username'], false, false) + || !$app->system->is_allowed_user($data['new']['puser'], true, true) + || !$app->system->is_allowed_group($data['new']['pgroup'], true, true)) { + $app->log('Shell user must not be root or in group root.',LOGLEVEL_WARN); + return false; + } + if($app->system->is_user($data['new']['puser'])) { // Get the UID of the parent user $uid = intval($app->system->getuid($data['new']['puser'])); -- Gitblit v1.9.1