diff --git a/config.php b/config.php index f824ca8..c634b9c 100644 --- a/config.php +++ b/config.php @@ -1,29 +1,31 @@ [ '-PS' => 'microsoft-ds', '-F' => true, '-T' => 5, - '--stylesheet' => "$BASEDIR/templates/lanScan.xsl", + '--stylesheet' => "lanScan.xsl", 'refreshPeriod' => 60, 'sudo' => false, ], "host" => [ - '-Pn' => true, - '-F' => true, - '-sV' => true, - '-T' => 5, - '--script' => "http-info,smb-shares-size", - '--stylesheet' => "$BASEDIR/templates/hostScan.xsl", - 'refreshPeriod' => 60, - 'sudo' => true, + '-Pn' => true, + '-F' => true, + '-sV' => true, + '-T' => 5, + '--script' => "http-info,smb-shares-size", + '--stylesheet' => "hostScan.xsl", + 'refreshPeriod' => 60, + 'sudo' => true, ], ]; diff --git a/filter_inputs.php b/filter_inputs.php index 624a645..aa3cf65 100644 --- a/filter_inputs.php +++ b/filter_inputs.php @@ -107,7 +107,7 @@ if ($preset && isset($presets[$preset])) { '-V' => FILTER_VALIDATE_BOOLEAN, '--unprivileged' => FILTER_VALIDATE_BOOLEAN, '-h' => FILTER_VALIDATE_BOOLEAN, - '--stylesheet' => FILTER_VALIDATE_URL, + '--stylesheet' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => $fileNameRegex]], // lanScan 'name' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => $fileNameRegex]], 'originalURL' => FILTER_VALIDATE_URL, diff --git a/index.php b/index.php index 3ff9154..4cc8488 100755 --- a/index.php +++ b/index.php @@ -583,10 +583,10 @@ Exemples: /24 10.