From 8cd6dce2f7f6ed058ada32b875377fc3e4c61432 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 5 Apr 2010 22:09:37 -0700 Subject: Use 3 arg open to create pipe Safer from user doing nasty things with command args. --- scripts/vyatta-load-user-key.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/vyatta-load-user-key.pl') diff --git a/scripts/vyatta-load-user-key.pl b/scripts/vyatta-load-user-key.pl index 29163f6a..d64dba8a 100755 --- a/scripts/vyatta-load-user-key.pl +++ b/scripts/vyatta-load-user-key.pl @@ -71,7 +71,7 @@ sub geturl { } $cmd .= " $url"; - open (my $curl, "$cmd |" ) + open (my $curl, "-|", $cmd ) or die "$cmd command failed: $!"; return $curl; -- cgit v1.2.3