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 632-639
sub checkauth {
Link Here
|
632 |
# when using authentication against multiple CAS servers, as configured in Auth_cas_servers.yaml |
633 |
# when using authentication against multiple CAS servers, as configured in Auth_cas_servers.yaml |
633 |
my $casparam = $query->param('cas'); |
634 |
my $casparam = $query->param('cas'); |
634 |
|
635 |
|
635 |
if ( $userid = $ENV{'REMOTE_USER'} ) { |
636 |
if ( $userid = $ENV{'REMOTE_USER'} ) { |
636 |
# Using Basic Authentication, no cookies required |
637 |
# Using Basic Authentication, no cookies required |
637 |
$cookie = $query->cookie( |
638 |
$cookie = $query->cookie( |
638 |
-name => 'CGISESSID', |
639 |
-name => 'CGISESSID', |
639 |
-value => '', |
640 |
-value => '', |
Lines 1135-1141
sub check_api_auth {
Link Here
|
1135 |
$sessionID = undef; |
1136 |
$sessionID = undef; |
1136 |
return ("expired", undef, undef); |
1137 |
return ("expired", undef, undef); |
1137 |
} else { |
1138 |
} else { |
1138 |
my $cookie = $query->cookie( CGISESSID => $session->id ); |
1139 |
my $cookie = $query->cookie( |
|
|
1140 |
-name => 'CGISESSID', |
1141 |
-value => $session->id, |
1142 |
-HttpOnly => 1, |
1143 |
); |
1139 |
$session->param('lasttime',time()); |
1144 |
$session->param('lasttime',time()); |
1140 |
my $flags = haspermission($userid, $flagsrequired); |
1145 |
my $flags = haspermission($userid, $flagsrequired); |
1141 |
if ($flags) { |
1146 |
if ($flags) { |
Lines 1179-1185
sub check_api_auth {
Link Here
|
1179 |
|
1184 |
|
1180 |
my $sessionID = $session->id; |
1185 |
my $sessionID = $session->id; |
1181 |
C4::Context->_new_userenv($sessionID); |
1186 |
C4::Context->_new_userenv($sessionID); |
1182 |
my $cookie = $query->cookie(CGISESSID => $sessionID); |
1187 |
my $cookie = $query->cookie( |
|
|
1188 |
-name => 'CGISESSID', |
1189 |
-value => $sessionID, |
1190 |
-HttpOnly => 1, |
1191 |
); |
1183 |
if ( $return == 1 ) { |
1192 |
if ( $return == 1 ) { |
1184 |
my ( |
1193 |
my ( |
1185 |
$borrowernumber, $firstname, $surname, |
1194 |
$borrowernumber, $firstname, $surname, |