add new security.limit_extensions setting to fpm-daemon settings

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2018-01-10 15:20:19 +01:00
parent 281b131c62
commit f2a79d4d96
11 changed files with 63 additions and 7 deletions

View File

@@ -192,6 +192,7 @@ class phpinterface_fpm
$fpm_max_spare_servers = (int) $this->_fpm_cfg['max_spare_servers'];
$fpm_requests = (int) $this->_fpm_cfg['max_requests'];
$fpm_process_idle_timeout = (int) $this->_fpm_cfg['idle_timeout'];
$fpm_limit_extensions = $this->_fpm_cfg['limit_extensions'];
if ($fpm_children == 0) {
$fpm_children = 1;
@@ -255,6 +256,7 @@ class phpinterface_fpm
}
$fpm_config .= ';chroot = ' . makeCorrectDir($this->_domain['documentroot']) . "\n";
$fpm_config .= 'security.limit_extensions = '.$fpm_limit_extensions . "\n";
$tmpdir = makeCorrectDir(Settings::Get('phpfpm.tmpdir') . '/' . $this->_domain['loginname'] . '/');
if (! is_dir($tmpdir)) {

View File

@@ -81,6 +81,15 @@ return array(
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'],
'type' => 'int',
'value' => 30
),
'limit_extensions' => array(
'label' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['description'],
'type' => 'string',
'string_delimiter' => ' ',
'string_regexp' => '^\.[a-z]([a-z0-9]+)',
'string_emptyallowed' => false,
'value' => '.php'
)
)
)

View File

@@ -82,6 +82,15 @@ return array(
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'],
'type' => 'int',
'value' => $result['idle_timeout']
),
'limit_extensions' => array(
'label' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['title'],
'desc' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['description'],
'type' => 'string',
'string_delimiter' => ' ',
'string_regexp' => '^\.[a-z]([a-z0-9]+)',
'string_emptyallowed' => false,
'value' => $result['limit_extensions']
)
)
)

View File

@@ -19,7 +19,7 @@
$version = '0.9.38.8';
// Database version (YYYYMMDDC where C is a daily counter)
$dbversion = '201801100';
$dbversion = '201801101';
// Distribution branding-tag (used for Debian etc.)
$branding = '';