Skip to content
Snippets Groups Projects
Commit a648820a authored by Jesse Norell's avatar Jesse Norell
Browse files

leading/trailing whitespace tries to add empty jailkit section/program

parent e0d7bcfc
No related branches found
No related tags found
1 merge request!1271Jailkit update exclude web folders
...@@ -2369,6 +2369,9 @@ class system{ ...@@ -2369,6 +2369,9 @@ class system{
# /etc/jailkit/jk_init.ini is the default path, probably not needed? # /etc/jailkit/jk_init.ini is the default path, probably not needed?
$program_args .= ' -c /etc/jailkit/jk_init.ini -j ?'; $program_args .= ' -c /etc/jailkit/jk_init.ini -j ?';
foreach($app_sections as $app_section) { foreach($app_sections as $app_section) {
if ($app_section == '') {
continue;
}
# should check that section exists with jk_init --list ? # should check that section exists with jk_init --list ?
$program_args .= ' ' . escapeshellarg($app_section); $program_args .= ' ' . escapeshellarg($app_section);
} }
...@@ -2448,6 +2451,9 @@ class system{ ...@@ -2448,6 +2451,9 @@ class system{
$bad_paths = array(); $bad_paths = array();
foreach($programs as $prog) { foreach($programs as $prog) {
if ($prog == '') {
continue;
}
foreach ($blacklisted_paths_regex as $re) { foreach ($blacklisted_paths_regex as $re) {
if (preg_match($re, $prog, $matches)) { if (preg_match($re, $prog, $matches)) {
$bad_paths[] = $matches[0]; $bad_paths[] = $matches[0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment