@@ -, +, @@ --- C4/Auth.pm | 20 ++++++++++++------- .../intranet-tmpl/prog/en/modules/auth.tt | 1 + .../bootstrap/en/includes/masthead.inc | 1 + .../bootstrap/en/modules/opac-main.tt | 1 + 4 files changed, 16 insertions(+), 7 deletions(-) --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -193,6 +193,16 @@ sub get_template_and_user { { skip_csrf_check => 1 }, ); } + my $session = get_session($sessionID); + + # We have just logged in + # If we are not coming from the login form we empty the credential to reject the access + if ( !$session && $user ) { + if ( $in->{query}->param('op') ne 'cud-login' ) { + $in->{query}->param('userid', ''); + $in->{query}->param('password', ''); + } + } # If we enforce GDPR and the user did not consent, redirect # Exceptions for consent page itself and SCI/SCO system @@ -213,11 +223,8 @@ sub get_template_and_user { if ( $in->{type} eq 'opac' && $user ) { my $is_sco_user; - if ($sessionID){ - my $session = get_session($sessionID); - if ($session){ - $is_sco_user = $session->param('sco_user'); - } + if ($session){ + $is_sco_user = $session->param('sco_user'); } my $kick_out; @@ -537,8 +544,7 @@ sub get_template_and_user { or $pagename =~ /^addbybiblionumber$/ or $pagename =~ /^review$/ ) { - my $sessionSearch = get_session( $sessionID ); - $sessionSearch->clear( ["busc"] ) if $sessionSearch; + $session->clear( ["busc"] ) if $session; } } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt @@ -124,6 +124,7 @@
[% INCLUDE 'csrf-token.inc' %] + [% FOREACH INPUT IN INPUTS %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -434,6 +434,7 @@
+
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt @@ -203,6 +203,7 @@
+
--