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

Item3679: User with I18N UserName and latin LoginName can not get his password

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine I18N Normal New   n/a  

Edit Form Data

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

Detail

Latin name user registration sevices have no problems. Any user with Cyrillic WikiUserName and latin LoginName can not get a password. He get a registration code, can edit his and others pages, get added to users list but see in left upper corner something like

No password sent and so it is imposiible to change or reset it.

Configuration settings and other related information:

$TWiki::cfg{Plugins}{DBCachePlugin}{Enabled} = 0;
$TWiki::cfg{Plugins}{BlackListPlugin}{Enabled} = 1;
$TWiki::cfg{UserInterfaceInternationalisation} = 1;
$TWiki::cfg{UseLocale} = 1;
$TWiki::cfg{Site}{Locale} = 'ru_RU.KOI8-R';
$TWiki::cfg{Site}{LocaleRegexes} = 1;
$TWiki::cfg{Site}{Lang} = 'ru';
$TWiki::cfg{Site}{FullLang} = 'ru_RU.KOI8-R';
$TWiki::cfg{Site}{CharSet} = 'koi8-r';
$TWiki::cfg{Sessions}{IDsInURLs} = 1;
$TWiki::cfg{Site}{Locale} = 'ru_RU.KOI8-R';
$TWiki::cfg{Site}{LocaleRegexes} = 1;
$TWiki::cfg{Site}{Lang} = 'ru';
$TWiki::cfg{Site}{FullLang} = 'ru_RU.KOI8-R';
$TWiki::cfg{Site}{CharSet} = 'koi8-r';
$TWiki::cfg{Sessions}{IDsInURLs} = 1;
$TWiki::cfg{RemovePortNumber} = 1;
$TWiki::cfg{Register}{HidePasswd} = 1;
$TWiki::cfg{Register}{AllowLoginName} = 1;
$TWiki::cfg{LoginManager} = 'TWiki::Client::TemplateLogin';
$TWiki::cfg{OS} = 'UNIX';
$TWiki::cfg{DetailedOS} = 'linux';
$TWiki::cfg{NameFilter} = '[\\s\\*?~^\\$@%`"\'&;|<>\\x00-\\x1f]';
$TWiki::cfg{AntiSpam}{HideUserDetails} = 1;
$TWiki::cfg{UpperNational} = '';
$TWiki::cfg{LowerNational} = '';
$TWiki::cfg{StoreImpl} = 'RcsWrap';
$TWiki::cfg{RCS}{ExtOption} = '';
$TWiki::cfg{MailProgram} = '/usr/sbin/sendmail -t -oi -oeq';

Linux Debian (stable, testing)

http://wiki.botik.ru

-- TWiki:Main/SergejZnamenskij - 23 Feb 2007

The question mark shoud not mark LoginName seznam in the left upper corner! Look to the source:

<div class="patternLeftBarPersonal">
Hello <span class="twikiNewLink">serznam<a href="/twiki/bin/edit/Main/Serznam?topicparent=Main.%D0%A1%D0%B5%D1%80%D0%97%D0%BD%D0%B0%D0%BC" rel="nofollow" title="Create this topic">?</a></span> 
<br><ul><li class="patternLogOut"><a href="/Main/%f3%c5%d2%fa%ce%c1%cd?logout=1">Log Out</a></li></ul>
<div class="patternLeftBarPersonalContent"><ul><li><a href="/twiki/bin/edit/Main/serznamLeftBar?templatetopic=TWiki.WebLeftBarPersonalTemplate&amp;topicparent=serznam">Create personal sidebar</a></li></ul></div></div>
You see the Cyryllic WikiUserName here first in utf-8 and next in koi8-r. Topic exists, but named in koi8-r encoding.

I have only applied the following dirty patch to repare sorting Item3680, but it has no relation to this problem.

--- TWikiUserMapping.pm.orig    2007-01-16 07:07:16.000000000 +0300
+++ TWikiUserMapping.pm 2007-02-14 17:18:11.000000000 +0300
@@ -175,6 +175,9 @@
     # add to the cache
     $this->{U2W}{$user->login()} = $user->{web} . "." . $user->wikiName();

+   require POSIX;
+   import POSIX qw( locale_h LC_CTYPE LC_COLLATE);
+   setlocale(&LC_COLLATE, $TWiki::cfg{Site}{Locale});
     # add name alphabetically to list
     foreach my $line ( split( /\r?\n/, $text) ) {
         # TODO: I18N fix here once basic auth problem with 8-bit user names is
@@ -185,7 +188,7 @@
                 $web = $1 || $TWiki::cfg{UsersWebName};
                 $name = $2;
                 $odate = $3;
-            } elsif ( $line =~ /^\s+\*\s([A-Z]) - / ) {
+            } elsif ( $line =~ /^\s+\*\s([[:upper:]]) - / ) {
                 #  * A - <a name="A">- - - -</a>^M
                 $name = $1;
             }

-- TWiki:Main.SergejZnamenskij - 24 Feb 2007

The main problem on this page needs investigation as you say. Presumably the user's page is not being created for Cyrillic-named WikiUsernames, which is why you then see the question mark on 'serznam' link at top of sidebar - the actual Cyrillic named link looks OK. So you need to look into where the user's page is being created and why it's failing there, I would think, as well as why no password is sent (could be consequential error, like the sidebar link).

As for the issue of users getting added properly to TWikiUsers, I had a look at this - I think the solution is to do the setlocale on LC_COLLATE in SVN:lib/TWiki.pm, where the other locale setup is done - that should then work for all modules, though I've not tested this.

Also, in SVN:lib/TWiki/Users/TWikiUserMapping.pm, your change to the regex needs improving so it works with standard locale regexes across all Perl versions and platforms:

              } elsif ( $line =~ /^\s+\*\s([$regex{upperAlpha}]) - / ) {   

Great to see these fixes going in - not sure if you have commit privileges for TWiki code, but if you're interested I'd be happy to support you in this. See TWiki:Codev.ReadmeFirst and in particular TWiki:Codev.SoYouWantToBeATWikiDeveloper.

-- TWiki:Main.RichardDonkin - 25 Feb 2007

The user page is being created as it was mentioned above, saying he can edit it. Its name is correct and the added to Users.txt line is correct.

I did know the regex was just for our installation case that was I mean the patch is dearty but sure it was much better al least to mark it as FIX ME in code.

I do not have the commit privileges for TWiki code. I can not promise to be very creative but hope very much to be useful and non-destructive.

By the way, I can not found any mention about Develop branch in SVN. What is it for and what I need to watch here?

-- TWiki:Main.SergejZnamenskij - 25 Feb 2007

Development is done on MAIN branch. "DEVELOP" branch was an old name for it.

CC

ItemTemplate
Summary User with I18N UserName and latin LoginName can not get his password
ReportedBy TWiki:Main.SergejZnamenskij
Codebase 4.0.1, 4.0.3, 4.0.5, 4.1.0, 4.1.1
SVN Range TWiki-4.1.1, Tue, 20 Feb 2007, build 12932
AppliesTo Engine
Component I18N
Priority Normal
CurrentState New
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2007-06-02 - TWikiUserMapping_CrawfordCurrie
 
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