Unverified Commit ec2f3520 authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #927 from ikedas/issue-580 by ikedas

After login, the last content, not always the last page, is shown (#580)
parents f88d6750 22872e72
...@@ -3,10 +3,8 @@ ...@@ -3,10 +3,8 @@
<li> <li>
<form id="use-sso" action="[% path_cgi %]" method="post"> <form id="use-sso" action="[% path_cgi %]" method="post">
<fieldset> <fieldset>
<input type="hidden" name="previous_action" value="[% previous_action %]" /> <input type="hidden" name="list" value="[% list %]" />
<input type="hidden" name="previous_list" value="[% previous_list %]" /> <input type="hidden" name="action" value="sso_login" />
<input type="hidden" name="list" value="[% list %]" />
<input type="hidden" name="action" value="sso_login" />
[% IF sso_number == 1 ~%] [% IF sso_number == 1 ~%]
[% FOREACH server = sso ~%] [% FOREACH server = sso ~%]
<input type="hidden" name="auth_service_name" value="[% server.key %]" /> <input type="hidden" name="auth_service_name" value="[% server.key %]" />
...@@ -47,8 +45,6 @@ ...@@ -47,8 +45,6 @@
<li class="[% class %]"> <li class="[% class %]">
<form action="[% path_cgi %]" method="POST"> <form action="[% path_cgi %]" method="POST">
<fieldset> <fieldset>
<input type="hidden" name="previous_action" value="[% action %]" />
<input type="hidden" name="previous_list" value="[% list %]" />
[% IF use_sso ~%] [% IF use_sso ~%]
<input type="hidden" name="only_passwd" value="1" /> <input type="hidden" name="only_passwd" value="1" />
[%~ END %] [%~ END %]
......
...@@ -1457,15 +1457,24 @@ while ($query = Sympa::WWW::FastCGI->new) { ...@@ -1457,15 +1457,24 @@ while ($query = Sympa::WWW::FastCGI->new) {
# or other temporary actions. # or other temporary actions.
# - We should not memorize URLs that are transitory actions. # - We should not memorize URLs that are transitory actions.
# - POST is not handled. # - POST is not handled.
# - Embedded images in archive should be ignored.
# - A lot of other methods where used in the past (before session was # - A lot of other methods where used in the past (before session was
# introduced in Sympa). We must clean all. # introduced in Sympa). We must clean all.
# N.B.: Location to where redirect should respect local authority. # N.B.: Location to where redirect should respect local authority.
if (not $temporary_actions{$action} if (not $temporary_actions{$action}
and $ENV{'REQUEST_METHOD'} eq 'GET') { and $ENV{'REQUEST_METHOD'} eq 'GET') {
my $redirect_url = my $arc_file = $in{'arc_file'} // '';
Sympa::WWW::Tools::get_my_url($robot, authority => 'local'); unless (
$redirect_url =~ s/[?].*\z//; $action eq 'arc'
$session->{'redirect_url'} = $redirect_url; and not($arc_file eq ''
or $arc_file =~ m{/\z}
or $arc_file =~ m{\A(?:mail|msg|thrd)\d+[.]html\z})
) {
my $redirect_url =
Sympa::WWW::Tools::get_my_url($robot, authority => 'local');
$redirect_url =~ s/[?].*\z//;
$session->{'redirect_url'} = $redirect_url;
}
} }
   
$action ||= Conf::get_robot_conf($robot, 'default_home'); $action ||= Conf::get_robot_conf($robot, 'default_home');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment