Bug 31908: [21.11.x] Fix Auth.pm

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
This commit is contained in:
Marcel de Rooy 2023-01-13 08:08:43 +00:00 committed by Arthur Suzuki
parent 415ec58c80
commit c2e0bc2d2d
No known key found for this signature in database
GPG Key ID: 7558BEE2BEEEBCAA
1 changed files with 3 additions and 2 deletions

View File

@ -959,8 +959,9 @@ sub checkauth {
}
unless ( $userid ) {
#we initiate a session prior to checking for a username to allow for anonymous sessions...
$session ||= get_session("") or die "Auth ERROR: Cannot get_session()";
if( !$session or !$sessionID ) { # if we cleared sessionID, we need a new session
$session = get_session() or die "Auth ERROR: Cannot get_session()";
}
# Save anonymous search history in new session so it can be retrieved
# by get_template_and_user to store it in user's search history after