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

Item4252: %REVINFO and logs shows incorrect user name for unregistered but authenticated users

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Low Confirmed A developer n/a  

Edit Form Data

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

Detail

Hi TWiki-Team, we have a problem with our TWiki install regarding the user name being displayed from REVINFO and when looking into the access logs.

Our setup uses Apache for Auth against a Kerberos service, which works very nicely. Our users MAY register additionally with TWiki to get a homepage in TWiki.

When moving to TWiki 4 we have seen that the %REVINFO does not work any more as expected when used like this:

%REVINFO{"Last edited on $date $time by $wikiusername"}%

If a user who is registered (say its me with wikiname ChristopherOezbek and kerberos login oezbek@PCPOOLNOSPAM.MI.FU-BERLIN.DE) edits a topic everything works well and ChristopherOezbek is displayed as $wikiusername.

But if another user who has not registered (say its johnny@PCPOOLNOSPAM.MI.FU-BERLIN.DE) then the REVINFO does not show Main.Guest or johnny@PCPOOLNOSPAM.MI.FU-BERLIN.DE (that's what would be best), but displays Main.DE.

I guess this situation arises because of our peculiar choice for kerberos auth names.

My best guess would be that in TWiki::User::new() the call to

my( $web, $topic ) =
      $session->normalizeWebTopicName( $TWiki::cfg{UsersWebName}, $wikiname );

might be the culprit, but I have not been able to debug the problem completely.

We also had a similar problem with the way the logs were written for a unregistered user, which we fixed in TWiki.pm:

sub writeLog {

    ....

    if( ref($user) && $user->isa('TWiki::User')) {
        $user = $user->login();
    }

By printing the login and not the wikiname (as this is important for our audit-trail), we kind of solved this problem for us.

-- TWiki:Main/ChristopherOezbek - 15 Jun 2007

This is an unfortunate combination of effects, that is ultimately caused your having periods (.) in your login names. When TWiki can't match a WikiName, then it uses the login name; but your login names look like topic names with webs in them, resulting in the wierd display. That's correct behaviour from the rendering code, but bad behaviour from the user management code. This code has been entirely rewritten for TWiki-4.2, and this very point (what to do when a user isn;t recognised) is just being discussed in TWiki:Codev.AddTWikiAdminUser.

I'm reprioritising this to Urgent, because we have an opportunity with 4.2 to make sure it comes out in the wash.

CC

Thanks for escalation and for clarifying the issue, Crawford!

-- TWiki:Main.ChristopherOezbek - 16 Jun 2007

sadly, We didn't manage to get this sorted out before the 4.2.0 feature freeze

defer til 4.3 or 5.0

TWiki:Codev. AddTWikiAdminUser

-- TWiki:Main.SvenDowideit - 27 Aug 2007

Hi Sven, never mind. We use a patched version of TWiki that has some tweaks in the right places to make it work for us. If there is anything I can do to help you guys with this, let me know.

Cheers, Christopher

-- TWiki:Main.ChristopherOezbek - 28 Aug 2007

When I fixed 5118 I changed the code so that the code now again displays the name as Main.loginname like it did in Cairo, 4.0 and 4.1

It is not perfect that REVINFO shows the Main. prefix if the person is not registered.

I have often thought about changing the spec for REVINFO with format="$wikiusername" so that the $wikiusername is shown with the Main. prefix only if the topic exists. But I am a bit worried about the performance hit making that check each and every time you need to show a topic revinfo. It is called 3 times on each normal page view and many many times during searches like in WebChanges.

But at least the problem is down to being cosmetic. You can see who the user is now. I think I can change priority to low.

-- TWiki:Main.KennethLavrsen - 30 Jul 2008

ItemTemplate
Summary %REVINFO and logs shows incorrect user name for unregistered but authenticated users
ReportedBy TWiki:Main.ChristopherOezbek
Codebase 4.1.1
SVN Range TWiki-4.1.2, Thu, 14 Jun 2007, build 14128
AppliesTo Engine
Component

Priority Low
CurrentState Confirmed
WaitingFor A developer
Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r9 - 2008-07-30 - KennethLavrsen
 
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