Lines 635-641
sub checkauth {
Link Here
|
635 |
$cookie = $query->cookie( |
635 |
$cookie = $query->cookie( |
636 |
-name => 'CGISESSID', |
636 |
-name => 'CGISESSID', |
637 |
-value => '', |
637 |
-value => '', |
638 |
-expires => '' |
638 |
-expires => '', |
|
|
639 |
-HttpOnly => 1, |
639 |
); |
640 |
); |
640 |
$loggedin = 1; |
641 |
$loggedin = 1; |
641 |
} |
642 |
} |
Lines 705-711
sub checkauth {
Link Here
|
705 |
$userid = undef; |
706 |
$userid = undef; |
706 |
} |
707 |
} |
707 |
else { |
708 |
else { |
708 |
$cookie = $query->cookie( CGISESSID => $session->id ); |
709 |
$cookie = $query->cookie( |
|
|
710 |
-name => 'CGISESSID', |
711 |
-value => $session->id, |
712 |
-HttpOnly => 1); |
709 |
$session->param('lasttime',time()); |
713 |
$session->param('lasttime',time()); |
710 |
unless ( $sessiontype && $sessiontype eq 'anon' ) { #if this is an anonymous session, we want to update the session, but not behave as if they are logged in... |
714 |
unless ( $sessiontype && $sessiontype eq 'anon' ) { #if this is an anonymous session, we want to update the session, but not behave as if they are logged in... |
711 |
$flags = haspermission($userid, $flagsrequired); |
715 |
$flags = haspermission($userid, $flagsrequired); |
Lines 722-728
sub checkauth {
Link Here
|
722 |
my $session = get_session("") or die "Auth ERROR: Cannot get_session()"; |
726 |
my $session = get_session("") or die "Auth ERROR: Cannot get_session()"; |
723 |
my $sessionID = $session->id; |
727 |
my $sessionID = $session->id; |
724 |
C4::Context->_new_userenv($sessionID); |
728 |
C4::Context->_new_userenv($sessionID); |
725 |
$cookie = $query->cookie( CGISESSID => $sessionID ); |
729 |
$cookie = $query->cookie( |
|
|
730 |
-name => 'CGISESSID', |
731 |
-value => $session->id, |
732 |
-HttpOnly => 1); |
726 |
$userid = $query->param('userid'); |
733 |
$userid = $query->param('userid'); |
727 |
if ( ( $cas && $query->param('ticket') ) |
734 |
if ( ( $cas && $query->param('ticket') ) |
728 |
|| $userid |
735 |
|| $userid |
Lines 914-920
sub checkauth {
Link Here
|
914 |
{ |
921 |
{ |
915 |
# successful login |
922 |
# successful login |
916 |
unless ($cookie) { |
923 |
unless ($cookie) { |
917 |
$cookie = $query->cookie( CGISESSID => '' ); |
924 |
$cookie = $query->cookie( |
|
|
925 |
-name => 'CGISESSID', |
926 |
-value => '', |
927 |
-HttpOnly => 1); |
918 |
} |
928 |
} |
919 |
return ( $userid, $cookie, $sessionID, $flags ); |
929 |
return ( $userid, $cookie, $sessionID, $flags ); |
920 |
} |
930 |
} |
921 |
- |
|
|