projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9776bbf
)
check for absolute paths
author
Joey Hess
<joey@kodama.kitenet.net>
Tue, 22 Jul 2008 21:38:31 +0000
(17:38 -0400)
committer
Joey Hess
<joey@kodama.kitenet.net>
Tue, 22 Jul 2008 21:38:31 +0000
(17:38 -0400)
IkiWiki/Plugin/rename.pm
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/rename.pm
b/IkiWiki/Plugin/rename.pm
index fd0bd3ae848b7399053726e8d28e316e772c9197..126c7ba13b96c6262497bfe983dd3fc63a402dc0 100644
(file)
--- a/
IkiWiki/Plugin/rename.pm
+++ b/
IkiWiki/Plugin/rename.pm
@@
-47,8
+47,9
@@
sub check_canrename ($$$$$$$) { #{{{
error(gettext("no change to the file name was specified"));
}
- # Must be a legal filename.
- if (IkiWiki::file_pruned($destfile, $config{srcdir})) {
+ # Must be a legal filename, and not absolute.
+ if (IkiWiki::file_pruned($destfile, $config{srcdir}) ||
+ $destfile=~/^\//) {
error(sprintf(gettext("illegal name")));
}