rename: Fix crash when renaming a page that is linked to by a page in an underlay.
authorJoey Hess <joey@kitenet.net>
Sat, 22 Jan 2011 14:20:38 +0000 (10:20 -0400)
committerJoey Hess <joey@kitenet.net>
Sat, 22 Jan 2011 14:20:38 +0000 (10:20 -0400)
Skip fixing links in such pages. The user will get a list of pages that
still link to the old page.

IkiWiki/Plugin/rename.pm
debian/changelog

index 57747d3c9df00141a1ade61e823c453a2ecbcc33..e871b815d6441a0cc52131932c283421c78c98c6 100644 (file)
@@ -567,6 +567,7 @@ sub fixlinks ($$$) {
                }
                if ($needfix) {
                        my $file=$pagesources{$page};
+                       next unless -e $config{srcdir}."/".$file;
                        my $oldcontent=readfile($config{srcdir}."/".$file);
                        my $content=renamepage_hook($page, $rename->{src}, $rename->{dest}, $oldcontent);
                        if ($oldcontent ne $content) {
index 0165a240bb0dc85d69387c197e682945573f7bc9..bed0bd6b4b45ddf5b13cafbaace06b4c642ab9aa 100644 (file)
@@ -5,6 +5,9 @@ ikiwiki (3.20110106) UNRELEASED; urgency=low
   * inline: Use class rather than id for feedlinks and blogform.
     (Giuseppe Bilotta)
   * comments: Fix XSS security hole due to missing validation of page name.
+    (Thanks, Dave B.)
+  * rename: Fix crash when renaming a page that is linked to by a page
+    in an underlay.
 
  -- Joey Hess <joeyh@debian.org>  Thu, 06 Jan 2011 14:41:34 -0400