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