From a52337130b0675d43e8b15d33cea1fa8c7654ef4 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Fri, 15 May 2015 08:49:17 +0200 Subject: [PATCH] - ported patch --- interface/lib/classes/validate_domain.inc.php | 4 ++++ server/plugins-available/shelluser_base_plugin.inc.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/interface/lib/classes/validate_domain.inc.php b/interface/lib/classes/validate_domain.inc.php index b4acbd6db..fde14b001 100644 --- a/interface/lib/classes/validate_domain.inc.php +++ b/interface/lib/classes/validate_domain.inc.php @@ -158,6 +158,10 @@ class validate_domain { if($domain['ip_address'] == '' || $domain['ipv6_address'] == ''){ if($domain['parent_domain_id'] > 0){ $parent_domain = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $domain['parent_domain_id']); + if(is_array($parent_domain) && !empty($parent_domain)){ + $domain['ip_address'] = $parent_domain['ip_address']; + $domain['ipv6_address'] = $parent_domain['ipv6_address']; + } } } diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index 0897a8498..a0ae9a51f 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -96,6 +96,8 @@ class shelluser_base_plugin { return false; } + if($data['new']['active'] != 'y') $data['new']['shell'] = '/bin/false'; + if($app->system->is_user($data['new']['puser'])) { // Get the UID of the parent user @@ -194,6 +196,8 @@ class shelluser_base_plugin { return false; } + if($data['new']['active'] != 'y') $data['new']['shell'] = '/bin/false'; + if($app->system->is_user($data['new']['puser'])) { // Get the UID of the parent user $uid = intval($app->system->getuid($data['new']['puser'])); -- GitLab