From b7e9afc06e06facfff4556f6b1592f8a33a59cbf Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 8 May 2015 12:27:26 -0300 Subject: Escape entire command to avoid breaking parameters --- etc/inc/pkg-utils.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc/inc/pkg-utils.inc') diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 9195076..4990699 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -99,7 +99,7 @@ function pkg_call($params) { } // XXX: Use proper call with fifo to collect statistics - $_gc = exec("env ASSUME_ALWAYS_YES=true /usr/sbin/pkg " . escapeshellarg($params), $output, $rc); + $_gc = exec(escapeshellcmd("env ASSUME_ALWAYS_YES=true /usr/sbin/pkg {$params}"), $output, $rc); return ($rc == 0); } -- cgit v1.1