Skip to content

Commit 1e6ea5a

Browse files
author
Till Brehm
committed
Improved user check in nginx plugin.
1 parent 2c49c56 commit 1e6ea5a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/plugins-available/nginx_plugin.inc.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,9 @@ function update($event_name, $data) {
352352
return 0;
353353
}
354354

355-
if(!$app->system->is_allowed_user($data['new']['system_user'], false, true)
356-
|| !$app->system->is_allowed_group($data['new']['system_group'], false, true)) {
357-
$app->log('Websites cannot be owned by the root user or group.', LOGLEVEL_WARN);
355+
if($app->system->is_allowed_user($data['new']['system_user'], $app->system->is_user($data['new']['system_user']), true) == false
356+
|| $app->system->is_allowed_group($data['new']['system_group'], $app->system->is_group($data['new']['system_group']), true) == false) {
357+
$app->log('Websites cannot be owned by the root user or group. User: '.$data['new']['system_user'].' Group: '.$data['new']['system_group'], LOGLEVEL_WARN);
358358
return 0;
359359
}
360360

0 commit comments

Comments
 (0)