• 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.

Item7825: RegisterTests fail with "success" when TWikiUsers.txt is set to readonly

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed TWiki:Main.HaraldJoerg n/a  

Edit Form Data

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

Detail

In test_4061, the TWikiUsers topic is set to readonly with the intention to make registration fail, and to verify that there's no waste in the password file. However, though the topic is readonly, registration succeeds and the new user is added to TWikiUsers.txt, which is also no longer readonly afterwards but writable.

Root cause: The change came with TWiki:Codev/SaveFileToBeAtomic: In the implementation, directly writing to TWikiUsers.txt has been replaced by writing to a temporary file and then renaming this file to TWikiUsers.txt. The difference is that on Linux, Perl's rename function is processed for readonly files as long as you are the owner.

Proposed solution: In addition to making the file TWikiUsers.txt readonly, make also the directory where it resides in readonly.

Another lesson from this is that making TWikiUsers.txt readonly does no longer prevent registration. I guess this doesn't hurt since the documented to disable registration is via configure, which works quite fine.

-- TWiki:Main/HaraldJoerg - 2017-10-15

ItemTemplate
Summary RegisterTests fail with "success" when TWikiUsers.txt is set to readonly
ReportedBy TWiki:Main.HaraldJoerg
Codebase ~twiki4
SVN Range TWiki-6.0.2-trunk, Thu, 17 Aug 2017, build 30273 -
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor TWiki:Main.HaraldJoerg
Checkins TWikirev:30395
TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r3 - 2017-10-15 - HaraldJoerg
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback