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