From 70da69a6ecde3be9f9cd72965857d0860d670605 Mon Sep 17 00:00:00 2001 From: CrawfordCurrie Date: Wed, 5 May 2010 07:43:55 +0000 Subject: [PATCH] Item2083: thanks to testing using trunk.foswiki.org, detected the case where a web is protected and the path info just has the web name results in a undef being passed to normalizeWebTopicName, causing a failure. On re-analysis, there is no reason to decode the original path_info - it can simply be appended unchanged to the url git-svn-id: http://svn.foswiki.org/trunk@7333 0b4bb1d4-4e5a-0410-9cc4-b2b747904278 --- core/lib/Foswiki/LoginManager/TemplateLogin.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/lib/Foswiki/LoginManager/TemplateLogin.pm b/core/lib/Foswiki/LoginManager/TemplateLogin.pm index 66dd8b54b7..c6bf5f23d3 100755 --- a/core/lib/Foswiki/LoginManager/TemplateLogin.pm +++ b/core/lib/Foswiki/LoginManager/TemplateLogin.pm @@ -83,13 +83,13 @@ sub forceAuthentication { # Redirect with passthrough so we don't lose the original query params + my $url = $session->getScriptUrl( 0, 'login'); + # We use the query here to ensure the original path_info # from the request gets through to the login form. See also # PATH_INFO below. - # $x because path_info always has a leading / - my ($x, $web, $topic) = split(/\/+/, $query->path_info()); + $url .= Foswiki::urlEncode( $query->path_info() ); - my $url = $session->getScriptUrl( 0, 'login', $web, $topic ); $query->param( -name => 'foswiki_origin', -value => _packRequest($session) ); $session->redirect( $url, 1 ); # with passthrough