Skip to content

Commit 9745f2c

Browse files
committed
- use directory validation regex for the php_cli_binary field
- updated .lng files - minor simplification of the PHP cli binary handling code - minor clean up (leftovers from use_php_alias)
1 parent 129ef6f commit 9745f2c

31 files changed

+68
-33
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,12 @@
260260
'php_cli_binary' => array(
261261
'datatype' => 'VARCHAR',
262262
'formtype' => 'TEXT',
263-
'filters' => array(
264-
0 => array( 'event' => 'SAVE',
265-
'type' => 'STRIPTAGS'),
266-
1 => array( 'event' => 'SAVE',
267-
'type' => 'STRIPNL')
263+
'validators' => array(
264+
0 => array (
265+
'type' => 'REGEX',
266+
'regex' => '/^\/[a-zA-Z0-9\/\-\_\ ]*$/',
267+
'errmsg'=> 'php_cli_binary_error_regex'
268+
),
268269
),
269270
'default' => '',
270271
'value' => '',

interface/web/admin/lib/lang/ar_server_php.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ $wb['tooltip_php_cli_binary_txt'] = 'Path to the PHP CLI binary including the fi
2626
$wb['php_jk_section_txt'] = 'PHP Jailkit section';
2727
$wb['tooltip_php_jk_section_txt'] = 'Identifier of the PHP version in your jk_init.ini (without square brackets).';
2828
$wb['php_cli_jk_section_error_regex'] = 'Invalid Jaikit chroot section';
29+
$wb['php_cli_binary_error_regex'] = 'Invalid path to PHP cli binary';
2930
?>

interface/web/admin/lib/lang/bg_server_php.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ $wb['tooltip_php_cli_binary_txt'] = 'Path to the PHP CLI binary including the fi
2626
$wb['php_jk_section_txt'] = 'PHP Jailkit section';
2727
$wb['tooltip_php_jk_section_txt'] = 'Identifier of the PHP version in your jk_init.ini (without square brackets).';
2828
$wb['php_cli_jk_section_error_regex'] = 'Invalid Jaikit chroot section';
29+
$wb['php_cli_binary_error_regex'] = 'Invalid path to PHP cli binary';
2930
?>

interface/web/admin/lib/lang/br_server_php.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ $wb['tooltip_php_cli_binary_txt'] = 'Path to the PHP CLI binary including the fi
2626
$wb['php_jk_section_txt'] = 'PHP Jailkit section';
2727
$wb['tooltip_php_jk_section_txt'] = 'Identifier of the PHP version in your jk_init.ini (without square brackets).';
2828
$wb['php_cli_jk_section_error_regex'] = 'Invalid Jaikit chroot section';
29+
$wb['php_cli_binary_error_regex'] = 'Invalid path to PHP cli binary';
2930
?>

interface/web/admin/lib/lang/ca_server_php.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ $wb['tooltip_php_cli_binary_txt'] = 'Path to the PHP CLI binary including the fi
2626
$wb['php_jk_section_txt'] = 'PHP Jailkit section';
2727
$wb['tooltip_php_jk_section_txt'] = 'Identifier of the PHP version in your jk_init.ini (without square brackets).';
2828
$wb['php_cli_jk_section_error_regex'] = 'Invalid Jaikit chroot section';
29+
$wb['php_cli_binary_error_regex'] = 'Invalid path to PHP cli binary';
2930
?>

interface/web/admin/lib/lang/cn_server_php.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ $wb['tooltip_php_cli_binary_txt'] = 'Path to the PHP CLI binary including the fi
2626
$wb['php_jk_section_txt'] = 'PHP Jailkit section';
2727
$wb['tooltip_php_jk_section_txt'] = 'Identifier of the PHP version in your jk_init.ini (without square brackets).';
2828
$wb['php_cli_jk_section_error_regex'] = 'Invalid Jaikit chroot section';
29+
$wb['php_cli_binary_error_regex'] = 'Invalid path to PHP cli binary';
2930
?>

interface/web/admin/lib/lang/cz_server_php.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ $wb['tooltip_php_cli_binary_txt'] = 'Path to the PHP CLI binary including the fi
2626
$wb['php_jk_section_txt'] = 'PHP Jailkit section';
2727
$wb['tooltip_php_jk_section_txt'] = 'Identifier of the PHP version in your jk_init.ini (without square brackets).';
2828
$wb['php_cli_jk_section_error_regex'] = 'Invalid Jaikit chroot section';
29+
$wb['php_cli_binary_error_regex'] = 'Invalid path to PHP cli binary';
2930
?>

interface/web/admin/lib/lang/de_server_php.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ $wb['tooltip_php_cli_binary_txt'] = 'Vollständiger Pfad zur PHP-CLI Binary (ink
2626
$wb['php_jk_section_txt'] = 'PHP Jailkit Sektion';
2727
$wb['tooltip_php_jk_section_txt'] = 'Bezeichner der PHP-Version in der jk_init.ini (Angabe ohne eckige Klammern)';
2828
$wb['php_cli_jk_section_error_regex'] = 'Ungültige Jaikit chroot-Sektion';
29+
$wb['php_cli_binary_error_regex'] = 'Ungültiger Pfad zur PHP-Cli-Binary';
2930
?>

interface/web/admin/lib/lang/dk_server_php.lng

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,9 @@ $wb['sortprio_txt'] = 'Priority';
2222
$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box<br>Default PHP has prio 0 if enabled<br>Lower value is higher priority';
2323
$wb['PHP-CLI settings'] = 'PHP-CLI settings';
2424
$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary';
25+
$wb['tooltip_php_cli_binary_txt'] = 'Path to the PHP CLI binary including the filename';
26+
$wb['php_jk_section_txt'] = 'PHP Jailkit section';
27+
$wb['tooltip_php_jk_section_txt'] = 'Identifier of the PHP version in your jk_init.ini (without square brackets).';
28+
$wb['php_cli_jk_section_error_regex'] = 'Invalid Jaikit chroot section';
29+
$wb['php_cli_binary_error_regex'] = 'Invalid path to PHP cli binary';
2530
?>

interface/web/admin/lib/lang/el_server_php.lng

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,9 @@ $wb['sortprio_txt'] = 'Priority';
2222
$wb['sortprio_long_txt'] = 'Priority of PHP version in the PHP version select box<br>Default PHP has prio 0 if enabled<br>Lower value is higher priority';
2323
$wb['PHP-CLI settings'] = 'PHP-CLI settings';
2424
$wb['php_cli_binary_txt'] = 'Path to the PHP CLI binary';
25+
$wb['tooltip_php_cli_binary_txt'] = 'Path to the PHP CLI binary including the filename';
26+
$wb['php_jk_section_txt'] = 'PHP Jailkit section';
27+
$wb['tooltip_php_jk_section_txt'] = 'Identifier of the PHP version in your jk_init.ini (without square brackets).';
28+
$wb['php_cli_jk_section_error_regex'] = 'Invalid Jaikit chroot section';
29+
$wb['php_cli_binary_error_regex'] = 'Invalid path to PHP cli binary';
2530
?>

0 commit comments

Comments
 (0)