Item11736: Block rename of the System or Users web
Priority: Urgent
Current State: Closed
Released In: 2.0.0
Target Release: major
It's possible for someone with admin rights to rename the System or Users web. This is rather destructive to the wiki.
Rename.pm should throw an error if rename of the System or Users web is attempted:
if ( $oldWeb eq $Foswiki::cfg{SystemWebName} || $oldWeb eq $Foswiki::cfg{UsersWebName} ) {
throw Foswiki::OopsException(
'attention',
web => $oldWeb,
topic => '',
def => 'rename_web_err',
params => [ "Rename is not permitted and would damage the installation" , 'anything' ]
);
}
--
GeorgeClark - 08 Apr 2012
Why should rename be forbidden if you can change the name in configure?
And which action should be done first?
--
ArthurClemens - 09 Apr 2012
I tried playing around with that a bit. If you rename in configure first, then it's not possible to actually perform the rename. Strikeone, css and js all become inoperative. However rename of the web first is pretty ugly as well.
If the System and Main macros are used in the distributed topics, then there is no reason the rename shouldn't be done during the installation, either with shell, or with other file administration tools on shared hosts.
--
GeorgeClark - 09 Apr 2012