Lines 264-275
sub get_template_and_user {
Link Here
|
264 |
$_->{'time'}, |
264 |
$_->{'time'}, |
265 |
) foreach @recentSearches; |
265 |
) foreach @recentSearches; |
266 |
|
266 |
|
267 |
# And then, delete the cookie's content |
267 |
# And then, delete the cookie's content |
268 |
my $newsearchcookie = $in->{'query'}->cookie( |
268 |
my $newsearchcookie = $in->{'query'}->cookie( |
269 |
-name => 'KohaOpacRecentSearches', |
269 |
-name => 'KohaOpacRecentSearches', |
270 |
-value => freeze([]), |
270 |
-value => freeze([]), |
271 |
-expires => '' |
271 |
-HttpOnly => 1, |
272 |
); |
272 |
-expires => '' |
|
|
273 |
); |
273 |
$cookie = [$cookie, $newsearchcookie]; |
274 |
$cookie = [$cookie, $newsearchcookie]; |
274 |
} |
275 |
} |
275 |
} |
276 |
} |
Lines 630-637
sub checkauth {
Link Here
|
630 |
# when using authentication against multiple CAS servers, as configured in Auth_cas_servers.yaml |
631 |
# when using authentication against multiple CAS servers, as configured in Auth_cas_servers.yaml |
631 |
my $casparam = $query->param('cas'); |
632 |
my $casparam = $query->param('cas'); |
632 |
|
633 |
|
633 |
if ( $userid = $ENV{'REMOTE_USER'} ) { |
634 |
if ( $userid = $ENV{'REMOTE_USER'} ) { |
634 |
# Using Basic Authentication, no cookies required |
635 |
# Using Basic Authentication, no cookies required |
635 |
$cookie = $query->cookie( |
636 |
$cookie = $query->cookie( |
636 |
-name => 'CGISESSID', |
637 |
-name => 'CGISESSID', |
637 |
-value => '', |
638 |
-value => '', |
Lines 1138-1144
sub check_api_auth {
Link Here
|
1138 |
$sessionID = undef; |
1139 |
$sessionID = undef; |
1139 |
return ("expired", undef, undef); |
1140 |
return ("expired", undef, undef); |
1140 |
} else { |
1141 |
} else { |
1141 |
my $cookie = $query->cookie( CGISESSID => $session->id ); |
1142 |
my $cookie = $query->cookie( |
|
|
1143 |
-name => 'CGISESSID', |
1144 |
-value => $session->id, |
1145 |
-HttpOnly => 1, |
1146 |
); |
1142 |
$session->param('lasttime',time()); |
1147 |
$session->param('lasttime',time()); |
1143 |
my $flags = haspermission($userid, $flagsrequired); |
1148 |
my $flags = haspermission($userid, $flagsrequired); |
1144 |
if ($flags) { |
1149 |
if ($flags) { |
Lines 1182-1188
sub check_api_auth {
Link Here
|
1182 |
|
1187 |
|
1183 |
my $sessionID = $session->id; |
1188 |
my $sessionID = $session->id; |
1184 |
C4::Context->_new_userenv($sessionID); |
1189 |
C4::Context->_new_userenv($sessionID); |
1185 |
my $cookie = $query->cookie(CGISESSID => $sessionID); |
1190 |
my $cookie = $query->cookie( |
|
|
1191 |
-name => 'CGISESSID', |
1192 |
-value => $sessionID, |
1193 |
-HttpOnly => 1, |
1194 |
); |
1186 |
if ( $return == 1 ) { |
1195 |
if ( $return == 1 ) { |
1187 |
my ( |
1196 |
my ( |
1188 |
$borrowernumber, $firstname, $surname, |
1197 |
$borrowernumber, $firstname, $surname, |