Skip to content

Commit 1d6d38c

Browse files
committed
- Hide Nginx Directives field - has no function yet.
- Added escapeshellcmd to some paths in nginx_plugin.inc.php.
1 parent 45ee671 commit 1d6d38c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

interface/web/sites/templates/web_domain_advanced.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ <h2><tmpl_var name="list_head_txt"></h2>
3232
<label for="apache_directives">{tmpl_var name='apache_directives_txt'}</label>
3333
<textarea name="apache_directives" id="apache_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='apache_directives'}</textarea>
3434
</div>
35-
<div class="ctrlHolder nginx">
35+
<div class="ctrlHolder apache">
3636
<label for="nginx_directives">{tmpl_var name='nginx_directives_txt'}</label>
3737
<textarea name="nginx_directives" id="nginx_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='nginx_directives'}</textarea>
3838
</div>

server/plugins-available/nginx_plugin.inc.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ private function php_fpm_pool_update ($data,$web_config) {
11011101
$tpl->setVar('fpm_port', $web_config['php_fpm_start_port'] + $data['new']['domain_id']);
11021102
$tpl->setVar('fpm_user', $data['new']['system_user']);
11031103
$tpl->setVar('fpm_group', $data['new']['system_group']);
1104-
$php_open_basedir = ($data['new']['php_open_basedir'] == '')?$data['new']['document_root']:$data['new']['php_open_basedir'];
1104+
$php_open_basedir = ($data['new']['php_open_basedir'] == '')?escapeshellcmd($data['new']['document_root']):escapeshellcmd($data['new']['php_open_basedir']);
11051105
$tpl->setVar('php_open_basedir', $php_open_basedir);
11061106
if($php_open_basedir != ''){
11071107
$tpl->setVar('enable_php_open_basedir', '');
@@ -1121,8 +1121,8 @@ private function php_fpm_pool_update ($data,$web_config) {
11211121
foreach($ini_settings as $ini_setting){
11221122
list($key, $value) = explode('=', $ini_setting);
11231123
if($value){
1124-
$value = trim($value);
1125-
$key = trim($key);
1124+
$value = escapeshellcmd(trim($value));
1125+
$key = escapeshellcmd(trim($key));
11261126
switch (strtolower($value)) {
11271127
case 'on':
11281128
case 'off':

0 commit comments

Comments
 (0)