[Koha-bugs] [Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 11 15:37:56 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

--- Comment #1 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 56185
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56185&action=edit
Bug 17427: Replace CGI::Session with Data::Session

CGI::Session is not maintained for ages and seems quite buggy.
It would be the culprit of random logout problems.

Another issue is the following crazy code in CGI::Session::Driver::DBI

sub DESTROY {
    my $self = shift;

    unless ( defined $self->{Handle} && $self->{Handle} -> ping ) {
        $self->set_error(__PACKAGE__ . '::DESTROY(). Database handle has gone
away');
        return;
        }

    unless ( $self->{Handle}->{AutoCommit} ) {
        $self->{Handle}->commit;
    }
    if ( $self->{_disconnect} ) {
        $self->{Handle}->disconnect;
    }
}

If AutoCommit is off, it will commit anyway...

It causes some tests to fail (api) if SessionStorage is set to MySQL

This is just a POC and will only works with SessionStorage set to MySQL.

Please test it and tell me if you find bug. If it looks bug free I will submit
a follow-up to cover the other combinations of SessionStorage (temporary
storage
and Memcached)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list