]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
check_canchange: report invalid filenames as intended
authorSimon McVittie <smcv@debian.org>
Mon, 9 Jan 2017 14:27:56 +0000 (14:27 +0000)
committerSimon McVittie <smcv@debian.org>
Mon, 9 Jan 2017 14:27:56 +0000 (14:27 +0000)
Instead of logging "bad file name %s" and attempting to call the
(string) filename as a subroutine, actually do the intended
sprintf operation.

IkiWiki.pm

index fa71f479107a2388fde2fe00a67bfa2daa4fb3a9..6aa49229ace4ba23c68267ca942786da445526ac 100644 (file)
@@ -1826,7 +1826,7 @@ sub check_canchange (@) {
                $file=possibly_foolish_untaint($file);
                if (! defined $file || ! length $file ||
                    file_pruned($file)) {
-                       error(gettext("bad file name %s"), $file);
+                       error(sprintf(gettext("bad file name %s"), $file));
                }
 
                my $type=pagetype($file);