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

Seen in http://koala.ilog.fr/twikiirc/bin/irclogger_log/twiki?date=2006-05-22,Mon&sel=305#l301, and in webs and topics with I18N chars (in the latter case web and topic names are doubled up, i.e. $web/$topic/$web/$topic).

Simply using the full url instead of the special query path construct fixes it (hope there's not too many side effects .. couldn't think of any).

-- SP

Only side effect: Broke redirection for standard non-i18n topics :-/

Need to find a way that will work for both kind of topics (perhaps normalizeWebTopicName need to consider url-encoded i18n chars or?)

-- SP

Problem is earlier, already the

$query->url( -path => 1, -query => 1 ) call in loginUrl will return something like

/twiki/bin/view/Main/Test%c6%d8/Main/Test%C6%D8

Perhaps the difference in casing in the encodings is what triggers this?

-- SP

This query->url seems badly broken with i18n topic names :-/

I'm tempted to simply do something like this:

Index: lib/TWiki/Client.pm
===================================================================
--- lib/TWiki/Client.pm (revision 10385)
+++ lib/TWiki/Client.pm (working copy)
@@ -258,7 +258,7 @@
     # is this a logout?
     if( $query && $query->param( 'logout' ) ) {
         _trace($this, "User is logging out");
-        my $origurl = $query->url().$query->path_info();
+        my $origurl = $ENV{HTTP_REFERER} || $query->url().$query->path_info();
         $this->redirectCgiQuery( $query, $origurl );
         $authUser = undef;
     }
Index: lib/TWiki/Client/TemplateLogin.pm
===================================================================
--- lib/TWiki/Client/TemplateLogin.pm   (revision 10385)
+++ lib/TWiki/Client/TemplateLogin.pm   (working copy)
@@ -56,7 +56,7 @@
     unless( $twiki->inContext( 'authenticated' )) {
         my $query = $twiki->{cgiQuery};
         # SMELL CGI::url drops the anchor. Report as bug against CGI::?
-        $query->param( origurl => $query->url( -path => 1, -query => 1 ));
+        $query->param( origurl => $ENV{REQUEST_URI} );
         $this->login( $query, $twiki );
         return 1;
     }
@@ -71,8 +71,7 @@
     my $web = $twiki->{webName};
     my $query = $twiki->{cgiQuery};
     return $twiki->getScriptUrl( 0, 'login', $web, $topic,
-                                 origurl => $query->url( -path => 1,
-                                                         -query => 1 ), @_ );
+                                 origurl => $ENV{REQUEST_URI} );
 }

 =pod

It works as supposed to in both scenarios. Firewalled browsers getting their referrers stripped are out of luck with i18n-topic names with this one on logout - but until $query is properly fixed I believe it will work OK(?).

-- SP

Committed above workaround to TWiki4, DEVELOP should be updated with fix for Item2381.

-- SP

Merged workaround to DEVELOP; it seems CGI.pm is not I18N compatible when it comes to this.

-- SP

Item2525 might be related to this item (another issue with web/topic names "doubled up").

-- SP

ItemTemplate
Summary Logins / logouts with template login does not work with I18N topic names
ReportedBy TWiki:Main.SteffenPoulsen
Codebase 4.0.1, ~twiki4, ~develop
SVN Range Sun, 28 May 2006 build 10378
AppliesTo Engine
Component

Priority Urgent
CurrentState Closed
WaitingFor

Checkins 10383 10384 10385 10386 10464
TargetRelease patch
Edit | Attach | Watch | Print version | History: r18 < r17 < r16 < r15 < r14 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r18 - 2006-06-22 - SteffenPoulsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback