]> sipb.mit.edu Git - ikiwiki.git/commitdiff
img: Fix a bug that could taint @links with undef values.
authorJoey Hess <joey@gnu.kitenet.net>
Fri, 29 Jan 2010 02:07:23 +0000 (21:07 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Fri, 29 Jan 2010 02:07:23 +0000 (21:07 -0500)
IkiWiki/Plugin/img.pm
debian/changelog

index c1048d3c927c3fad75c9a7b88b32dbe3833aa814..82db15a7ea3a6b5cf47b1cb93010792e765479fc 100644 (file)
@@ -26,6 +26,10 @@ sub preprocess (@) {
        my ($image) = $_[0] =~ /$config{wiki_file_regexp}/; # untaint
        my %params=@_;
 
        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}) {
        if (exists $imgdefaults{$params{page}}) {
                foreach my $key (keys %{$imgdefaults{$params{page}}}) {
                        if (! exists $params{$key}) {
index 0ec696d3c0214dbb37e44e7daabdf10bff9d9a5a..5d27b7af05d5e87cc68bab818fc4bc950effb058 100644 (file)
@@ -1,6 +1,7 @@
 ikiwiki (3.20100123) UNRELEASED; urgency=low
 
   * template: Preprocess parameters before htmlizing.
 ikiwiki (3.20100123) UNRELEASED; urgency=low
 
   * template: Preprocess parameters before htmlizing.
+  * img: Fix a bug that could taint @links with undef values.
 
  -- Joey Hess <joeyh@debian.org>  Tue, 26 Jan 2010 22:25:33 -0500
 
 
  -- Joey Hess <joeyh@debian.org>  Tue, 26 Jan 2010 22:25:33 -0500