]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
comments: Fix XSS security hole due to missing validation of page name. CVE-2011... 3.20100815.5
authorJoey Hess <joey@kitenet.net>
Sat, 22 Jan 2011 15:04:00 +0000 (11:04 -0400)
committerJoey Hess <joey@kitenet.net>
Sat, 22 Jan 2011 15:04:00 +0000 (11:04 -0400)
IkiWiki/Plugin/comments.pm
debian/changelog

index a39dab36cdb81e6c06049d9c0bc312a6e58b1dd2..6bacd26c7832ae75ecd5b6d4dea97b4a6c244453 100644 (file)
@@ -364,8 +364,8 @@ sub editcomment ($$) {
        }
 
        # The untaint is OK (as in editpage) because we're about to pass
-       # it to file_pruned anyway
-       my $page = $form->field('page');
+       # it to file_pruned and wiki_file_regexp anyway.
+       my $page = $form->field('page')=~/$config{wiki_file_regexp}/;
        $page = IkiWiki::possibly_foolish_untaint($page);
        if (! defined $page || ! length $page ||
                IkiWiki::file_pruned($page)) {
index 734e2471d38d2da38bc46ee0030aaf3a7ea69a74..4f9b06d2995f96afc379f491301eb86df755c0da 100644 (file)
@@ -1,3 +1,10 @@
+ikiwiki (3.20100815.5) testing; urgency=low
+
+  * comments: Fix XSS security hole due to missing validation of page name.
+    CVE-2011-0428 (Thanks, Dave B.)
+
+ -- Joey Hess <joeyh@debian.org>  Sat, 22 Jan 2011 11:02:59 -0400
+
 ikiwiki (3.20100815.4) testing; urgency=low
 
   * meta: Fix calling of htmlscrubber to pass the page parameter.