• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item7838: subweb named RCS causes problems

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   patch 6.1.0

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

A subweb named RCS is problematic. Let's say the Main web has the subweb Main/RCS. TWiki::Store::RcsWrap::initText() called for a topic in the Main web ends up creating an RCS file in the data/Main/RCS/ directory. Let's say Main/RCS.FooBar topic already exists but Main.FooBar does not. Then, if Main.FooBar is created, data/Main/RCS/FooBar.txt,v is tried to be created but it already exists for Main/RCS.FooBar, so it fails.

The top level web RCS doesn't cause problems because there are no files to be handled with RCS in the data directory.

A topic named RCS doesn't cause problems even with attachments. Attachment files of a topic named RCS are put under the directory pub/WEB_NAME/RCS/, but there is no files in the pub/WEB_NAME/ directory -- only directories are there. So there is no chance of an RCS file to be created for a file directly under the pub/WEB_NAME/ directory.

I'd propose to introduce $TWiki::cfg{InvalidWebNameRegex} and use it in TWiki::isValidWeb() in the following manner.

 my $sys = shift;
+return 0 if ( $name =~ /$TWiki::cfg{InvalidWebNameRegex}/o );
 return 1 if ( $sys && $name =~ m/^$regex{defaultWebNameRegex}$/o );

In lib/TWiki.spec:

$TWiki::cfg{InvalidWebNameRegex} = '[./]RCS\\b';

This doesn't prevent the top level web RCS while forbidding a subweb named RCS to be created. At the same time, it prevents a subweb named TOP_LEVEL/RCS/THIRD_LEVEL from being created, which would cause problems.

-- TWiki:Main/HideyoImazu - 2018-04-19

Based on a discussion at TWiki:Codev/KampalaReleaseMeeting2018x04x19, $TWiki::cfg{InvalidWebName} value is made a string.

-- TWiki:Main.HideyoImazu - 2018-04-20

ItemTemplate
Summary subweb named RCS causes problems
ReportedBy TWiki:Main.HideyoImazu
Codebase ~twiki4
SVN Range TWiki-6.0.2-trunk, Tue, 06 Feb 2018, build 30420
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:30428 TWikirev:30429
TargetRelease patch
ReleasedIn 6.1.0
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2018-07-17 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback