Browse Source

Fix can clean var

Laurent Destailleur 2 years ago
parent
commit
ec45afb05f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      htdocs/admin/security_file.php

+ 1 - 1
htdocs/admin/security_file.php

@@ -67,7 +67,7 @@ if ($action == 'updateform') {
 	$antivircommand = dol_string_nospecial($antivircommand, '', array("|", ";", "<", ">", "&")); // Sanitize command
 	$antivirparam = dol_string_nospecial($antivirparam, '', array("|", ";", "<", ">", "&")); // Sanitize params
 
-	if (!empty($dolibarr_main_restrict_os_commands)) {
+	if ($antivircommand && !empty($dolibarr_main_restrict_os_commands)) {
 		$arrayofallowedcommand = explode(',', $dolibarr_main_restrict_os_commands);
 		$arrayofallowedcommand = array_map('trim', $arrayofallowedcommand);
 		dol_syslog("Command are restricted to ".$dolibarr_main_restrict_os_commands.". We check that one of this command is inside ".$antivircommand);