From: Joey Hess Date: Fri, 29 Jan 2010 02:07:23 +0000 (-0500) Subject: img: Fix a bug that could taint @links with undef values. X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/f91d79f469956c423373c8747c92218c668f0ba8 img: Fix a bug that could taint @links with undef values. --- diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index c1048d3c9..82db15a7e 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -26,6 +26,10 @@ sub preprocess (@) { my ($image) = $_[0] =~ /$config{wiki_file_regexp}/; # untaint my %params=@_; + if (! defined $image) { + error("bad image filename"); + } + if (exists $imgdefaults{$params{page}}) { foreach my $key (keys %{$imgdefaults{$params{page}}}) { if (! exists $params{$key}) { diff --git a/debian/changelog b/debian/changelog index 0ec696d3c..5d27b7af0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ ikiwiki (3.20100123) UNRELEASED; urgency=low * template: Preprocess parameters before htmlizing. + * img: Fix a bug that could taint @links with undef values. -- Joey Hess Tue, 26 Jan 2010 22:25:33 -0500