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

Item6889: TWiki::Render::renderRevisonInfo() incorrectly handling cUID

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   major 6.0.0

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


After executing the following line, $user has a cUID rather than login or wikiname.
( $date, $user, $rev, $comment ) = $meta->getRevisionInfo( $rrev );
But TWiki::Render::renderRevisonInfo() is not written that way. The current code assumes $user has a login or wikiname having the following line.
my $cUID = $users->getCanonicalUserID( $user );
This should be a simple mistake and needs to be corrected.

-- TWiki:Main/HideyoImazu - 2012-06-21

TWiki:Main.PeterThoeny pointed out:

Please re-examine this change. Now the code assumes that the user returned from meta data is always CUID, and that the user is known in the password system. This is not always the case:

  1. $meta->getRevisionInfo() usually returns CUID. But in older TWiki versions, or in data migrated to a TWiki installation, the returned user can be WikiName or login name.
  2. The $users object only contains users known to the system. That is,
$users->getCanonicalUserID() returns the CUID only for known users. It is common that meta data contains names of deleted users, in which case getCanonicalUserID returns null. So for users unknown to the password system a best effort is done to return the proper user type (CUID, login name, or WikiName) from the meta data.

Now the code accommodates revision data of pre-cUID days. It checks if the user returned by $meta->getRevisionInfo() is cUID or not by using $users->getLoginName($user). Only if it's not, $users->getCanonicalUserID($user) is called rather than always.

-- TWiki:Main.HideyoImazu - 2012-06-22

Summary TWiki::Render::renderRevisonInfo() incorrectly handling cUID
ReportedBy HideyoImazu
Codebase ~twiki4, 5.1.1, 5.1.0, 5.0.2, 5.0.1, 5.0.0
SVN Range

AppliesTo Engine

Priority Normal
CurrentState Closed

Checkins TWikirev:23012
TargetRelease major
ReleasedIn 6.0.0
Edit | Attach | Watch | Print version | History: r15 < r14 < r13 < r12 < r11 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r15 - 2013-10-15 - PeterThoeny
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