$_->{'time'},
) foreach @recentSearches;
- # And then, delete the cookie's content
- my $newsearchcookie = $in->{'query'}->cookie(
- -name => 'KohaOpacRecentSearches',
- -value => freeze([]),
- -expires => ''
- );
+ # And then, delete the cookie's content
+ my $newsearchcookie = $in->{'query'}->cookie(
+ -name => 'KohaOpacRecentSearches',
+ -value => freeze([]),
+ -HttpOnly => 1,
+ -expires => ''
+ );
$cookie = [$cookie, $newsearchcookie];
}
}
# when using authentication against multiple CAS servers, as configured in Auth_cas_servers.yaml
my $casparam = $query->param('cas');
- if ( $userid = $ENV{'REMOTE_USER'} ) {
- # Using Basic Authentication, no cookies required
+ if ( $userid = $ENV{'REMOTE_USER'} ) {
+ # Using Basic Authentication, no cookies required
$cookie = $query->cookie(
-name => 'CGISESSID',
-value => '',
$sessionID = undef;
return ("expired", undef, undef);
} else {
- my $cookie = $query->cookie( CGISESSID => $session->id );
+ my $cookie = $query->cookie(
+ -name => 'CGISESSID',
+ -value => $session->id,
+ -HttpOnly => 1,
+ );
$session->param('lasttime',time());
my $flags = haspermission($userid, $flagsrequired);
if ($flags) {
my $sessionID = $session->id;
C4::Context->_new_userenv($sessionID);
- my $cookie = $query->cookie(CGISESSID => $sessionID);
+ my $cookie = $query->cookie(
+ -name => 'CGISESSID',
+ -value => $sessionID,
+ -HttpOnly => 1,
+ );
if ( $return == 1 ) {
my (
$borrowernumber, $firstname, $surname,