stef-guest at alioth.debian.org
2008-Apr-01 21:52 UTC
[Secure-testing-commits] r8465 - bin
Author: stef-guest Date: 2008-04-01 21:52:08 +0000 (Tue, 01 Apr 2008) New Revision: 8465 Modified: bin/check-new-issues Log: fix escaping of product names Modified: bin/check-new-issues ==================================================================--- bin/check-new-issues 2008-04-01 21:36:42 UTC (rev 8464) +++ bin/check-new-issues 2008-04-01 21:52:08 UTC (rev 8465) @@ -170,8 +170,9 @@ elsif ($r=~ /^\.f(.*)$/ ) { my $s = $1; $s =~ s/^\s*(.*?)\s*$/$1/; + $s = quotemeta($s); print "=== apt-file search ''$s'':\n"; - system("apt-file search ''$s''|less -FX"); + system("apt-file search $s|less -FX"); print "===\n"; next READ; } @@ -282,8 +283,9 @@ $prog = $1; } if ($prog) { + my $prog_esc = quotemeta($prog); print "doing apt-cache search..."; - my $ac=`apt-cache search ''$prog'' |wc -l`; + my $ac=`apt-cache search $prog_esc |wc -l`; chomp $ac; print "\r$ac results from apt-cache search $prog\n"; @@ -296,8 +298,9 @@ } if ( $file =~ /(php3?|asp|cgi|pl)$/ ) { if (! exists $afcache{$file}) { + my $file_esc = quote_meta($file); print "doing apt-file search..."; - $afcache{$file}=`apt-file -i search ''$file'' |wc -l`; + $afcache{$file}=`apt-file -i search $file_esc |wc -l`; chomp $afcache{$file}; } print "\r$afcache{$file} results from apt-file -i search $file\n";