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

pencil
Priority: Low
Current State: Confirmed
Released In:
Target Release: n/a
Applies To: Engine
Component:
Branches:
Reported By: TWiki:Main.ChristopherOezbek
Waiting For: A developer
Last Change By: KennethLavrsen
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@PCPOOL.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@PCPOOL.MI.FU-BERLIN.DE) then the REVINFO does not show Main.Guest or johnny@PCPOOL.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 edit

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
Topic revision: r9 - 30 Jul 2008, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy