Skip to content

Commit

Permalink
Item15221: clear logout url param from login
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Oct 3, 2023
1 parent 7bc8778 commit 9f6c1cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/lib/Foswiki/LoginManager/TemplateLogin.pm
Expand Up @@ -129,8 +129,6 @@ Overrides LoginManager. Content of a login link.
sub loginUrl {
my $this = shift;
my $session = $this->{session};
my $topic = $session->{topicName};
my $web = $session->{webName};
return $session->getScriptUrl( 0, 'login', undef, undef,
foswiki_origin => _packRequest($session) );
}
Expand Down Expand Up @@ -163,6 +161,10 @@ sub login {

my $origin = $query->param('foswiki_origin');
my ( $origurl, $origmethod, $origaction ) = _unpackRequest($origin);

$origurl =~ s/[\?&;]logout=(1|on|yes)//
if $origurl; # don't propagate logout

my $loginName = $query->param('username');
my $loginPass = $query->param('password');
my $remember = $query->param('remember');
Expand Down

0 comments on commit 9f6c1cc

Please sign in to comment.