Projet

Général

Profil

« Précédent | Suivant » 

Révision e41ab9aa

Ajouté par Renato Botelho il y a presque 10 ans

Escape parameters passed to shell_exec()

Voir les différences:

usr/local/pkg/openntpd.inc
21 21

  
22 22
function openntpd_get_iface_ip($iface) {
23 23
	$iface = convert_friendly_interface_to_real_interface_name($iface);
24
	$line = trim(shell_exec("ifconfig $iface | grep inet | grep -v inet6"));
24
	$line = trim(shell_exec("ifconfig " . escapeshellarg($iface) . " | grep inet | grep -v inet6"));
25 25
	list($dummy, $ip, $dummy2, $dummy3) = explode(' ', $line);
26 26

  
27 27
	return $ip;

Formats disponibles : Unified diff