Skip to content

Commit 0e6d052

Browse files
author
Till Brehm
committed
Some improvements for Commit a39f367
1 parent a39f367 commit 0e6d052

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

interface/web/admin/form/server_config.tform.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,14 @@
11011101
'validators' => array( 0 => array('type' => 'NOTEMPTY',
11021102
'errmsg' => 'php_default_name_error_empty'),
11031103
),
1104+
'filters' => array(
1105+
0 => array( 'event' => 'SAVE',
1106+
'type' => 'TRIM'),
1107+
1 => array( 'event' => 'SAVE',
1108+
'type' => 'STRIPTAGS'),
1109+
2 => array( 'event' => 'SAVE',
1110+
'type' => 'STRIPNL')
1111+
),
11041112
'width' => '40',
11051113
'maxlength' => '255'
11061114
),

interface/web/sites/web_vhost_domain_edit.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ function onShowEnd() {
257257
$php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND (client_id = 0 OR client_id=?) AND active = 'y'", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']);
258258
}
259259
}
260-
$php_select = "<option value=''>".$web_config['php_default_name']."</option>";
260+
$php_select = "<option value=''>".$app->functions->htmlentities($web_config['php_default_name'])."</option>";
261261
if(is_array($php_records) && !empty($php_records)) {
262262
foreach( $php_records as $php_record) {
263263
if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){
@@ -404,7 +404,7 @@ function onShowEnd() {
404404
$php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND (client_id = 0 OR client_id=?) AND active = 'y'", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']);
405405
}
406406
}
407-
$php_select = "<option value=''>".$web_config['php_default_name']."</option>";
407+
$php_select = "<option value=''>".$app->functions->htmlentities($web_config['php_default_name'])."</option>";
408408
if(is_array($php_records) && !empty($php_records)) {
409409
foreach( $php_records as $php_record) {
410410
if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){
@@ -624,7 +624,7 @@ function onShowEnd() {
624624
$php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND active = 'y'", $parent_domain['server_id']);
625625
}
626626
}
627-
$php_select = "<option value=''>".$web_config['php_default_name']."</option>";
627+
$php_select = "<option value=''>".$app->functions->htmlentities($web_config['php_default_name'])."</option>";
628628
if(is_array($php_records) && !empty($php_records)) {
629629
foreach( $php_records as $php_record) {
630630
if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){

0 commit comments

Comments
 (0)