Skip to content

Commit

Permalink
Item2083: thanks to testing using trunk.foswiki.org, detected the cas…
Browse files Browse the repository at this point in the history
…e 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
  • Loading branch information
CrawfordCurrie authored and CrawfordCurrie committed May 5, 2010
1 parent 9822464 commit 70da69a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/lib/Foswiki/LoginManager/TemplateLogin.pm
Expand Up @@ -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
Expand Down

0 comments on commit 70da69a

Please sign in to comment.