From 218724a54c08f3dd28beae384842929022b92192 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Tue, 7 Dec 2004 11:00:59 +0000 Subject: Move untaint() into urpm::util. Fix a comment in urpmi. --- urpm/util.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'urpm') diff --git a/urpm/util.pm b/urpm/util.pm index 8abb816e..6e8e483f 100644 --- a/urpm/util.pm +++ b/urpm/util.pm @@ -6,7 +6,7 @@ our @ISA = 'Exporter'; our @EXPORT = qw(quotespace unquotespace remove_internal_name reduce_pathname offset_pathname - md5sum + md5sum untaint ); #- quoting/unquoting a string that may be containing space chars. @@ -72,6 +72,12 @@ sub offset_pathname { $result . join('/', reverse @corrections); } +sub untaint { + my @r; + foreach (@_) { /(.*)/; push @r, $1 } + @r == 1 ? $r[0] : @r; +} + sub md5sum { #- Use an external command to avoid depending on perl my ($file) = @_; -- cgit v1.2.1