View | Details | Raw Unified | Return to bug 29957
Collapse All | Expand All

(-)a/C4/Auth.pm (-11 / +4 lines)
Lines 47-52 use Encode; Link Here
47
use C4::Auth_with_shibboleth qw( shib_ok get_login_shib login_shib_url logout_shib checkpw_shib );
47
use C4::Auth_with_shibboleth qw( shib_ok get_login_shib login_shib_url logout_shib checkpw_shib );
48
use Net::CIDR;
48
use Net::CIDR;
49
use C4::Log qw( logaction );
49
use C4::Log qw( logaction );
50
use Koha::CookieManager;
50
51
51
# use utf8;
52
# use utf8;
52
53
Lines 804-818 sub _timeout_syspref { Link Here
804
    return $timeout;
805
    return $timeout;
805
}
806
}
806
807
807
sub clear_all_cookies {
808
    my ( $query ) = shift;
809
    my @cookies;
810
    for my $cookie_name ( $query->cookie ) {
811
        push @cookies, $query->cookie( -name => $cookie_name, -value => '', -expires => '', -HttpOnly => 1 );
812
    }
813
    return \@cookies;
814
}
815
816
sub checkauth {
808
sub checkauth {
817
    my $query = shift;
809
    my $query = shift;
818
810
Lines 843-848 sub checkauth { Link Here
843
    my $dbh     = C4::Context->dbh;
835
    my $dbh     = C4::Context->dbh;
844
    my $timeout = _timeout_syspref();
836
    my $timeout = _timeout_syspref();
845
837
838
    my $cookie_mgr = Koha::CookieManager->new;
839
846
    _version_check( $type, $query );
840
    _version_check( $type, $query );
847
841
848
    # state variables
842
    # state variables
Lines 915-921 sub checkauth { Link Here
915
                my $shibSuccess = C4::Context->userenv->{'shibboleth'};
909
                my $shibSuccess = C4::Context->userenv->{'shibboleth'};
916
                $session->delete();
910
                $session->delete();
917
                $session->flush;
911
                $session->flush;
918
                $cookie = clear_all_cookies($query);
912
                $cookie = [ $cookie_mgr->clear_if_allowed( $query->cookie, @$cookie ) ];
919
                C4::Context->_unset_userenv($sessionID);
913
                C4::Context->_unset_userenv($sessionID);
920
914
921
                if ($cas and $caslogout) {
915
                if ($cas and $caslogout) {
922
- 

Return to bug 29957