]> sipb.mit.edu Git - ikiwiki.git/commitdiff
fix
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Mon, 31 Jul 2006 00:59:54 +0000 (00:59 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Mon, 31 Jul 2006 00:59:54 +0000 (00:59 +0000)
IkiWiki/Plugin/aggregate.pm

index 98e53436640f9303643c7d6427ede146b92bd266..14461059d560774fdead466be1ebfb052c9ed1ee 100644 (file)
@@ -254,14 +254,15 @@ sub add_page (@) { #{{{
 
                # assign it an unused page
                my $page=IkiWiki::titlepage($params{title});
-               $page=~s!([/])!"__".ord($1)."__"!eg; # escape slashes in title
+               # escape slashes and periods in title so it doesn't specify
+               # directory name or trigger ".." disallowing code.
+               $page=~s!([/.])!"__".ord($1)."__"!eg;
                $page=$feed->{dir}."/".$page;
                $page=lc($page);
                ($page)=$page=~/$IkiWiki::config{wiki_file_regexp}/;
                if (! defined $page || ! length $page) {
                        $page=$feed->{dir}."/item";
                }
-               $page=~s/\.\.//g; # avoid ".." directory tricks
                my $c="";
                while (exists $IkiWiki::pagesources{$page.$c} ||
                       -e pagefile($page.$c)) {