Quantcast

[Bug 17427] New: Replace CGI::Session with Data::Session

classic Classic list List threaded Threaded
26 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] New: Replace CGI::Session with Data::Session

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

            Bug ID: 17427
           Summary: Replace CGI::Session with Data::Session
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

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

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

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

--- Comment #1 from Jonathan Druart <[hidden email]> ---
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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |In Discussion
           Assignee|[hidden email]          |[hidden email]-c
                   |                            |ommunity.org

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email],
                   |                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

Benjamin Rokseth <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
                   |                            |ommune.no

--- Comment #2 from Benjamin Rokseth <[hidden email]> ---
This is great detective work, and it makes real sense to deprecate a deprecated
session handler! I have tested with api and finally tests with autocommit set
to null actually rolls back, so I no longer am left with a skewed db.

please bring this on and I will happily test and sign off!

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|In Discussion               |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #56185|0                           |1
        is obsolete|                            |

--- Comment #3 from Jonathan Druart <[hidden email]> ---
Created attachment 56504
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56504&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

Note that PostgreSQL is not supported yet so no need to implement it.

Test plan:
0/ The dependencies are not packaged for debian so far, so install it
via cpan
1/ Test the 3 different values for SessionStorage
2/ Using different browsers (or sessions) login into Koha with different
users. Naviguate => you should not be logged out
3/ Set SessionStorage to Memcached, stop memcached make sure that it
defaults to file.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

--- Comment #4 from Jonathan Druart <[hidden email]> ---
(In reply to Benjamin Rokseth from comment #2)
> This is great detective work, and it makes real sense to deprecate a
> deprecated session handler! I have tested with api and finally tests with
> autocommit set to null actually rolls back, so I no longer am left with a
> skewed db.
>
> please bring this on and I will happily test and sign off!

It's your turn to play ;)

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

--- Comment #5 from Jonathan Druart <[hidden email]> ---
I should note: The first patch did not work as expected, it defaulted to File
(instead of mysql).

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

Josef Moravec <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

Benjamin Rokseth <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #56504|0                           |1
        is obsolete|                            |

--- Comment #6 from Benjamin Rokseth <[hidden email]> ---
Created attachment 56572
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56572&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

Note that PostgreSQL is not supported yet so no need to implement it.

Test plan:
0/ The dependencies are not packaged for debian so far, so install it
via cpan
1/ Test the 3 different values for SessionStorage
2/ Using different browsers (or sessions) login into Koha with different
users. Naviguate => you should not be logged out
3/ Set SessionStorage to Memcached, stop memcached make sure that it
defaults to file.

Signed-off-by: Benjamin Rokseth <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

Benjamin Rokseth <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Signed Off

--- Comment #7 from Benjamin Rokseth <[hidden email]> ---
Works perfectly! Corrected a small typo in the PerlDependencies.

No sessions lost in tempfiles, mysql or memcached, and they survived a plack
restart.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

--- Comment #8 from Martin Renvoize <[hidden email]> ---
Comment on attachment 56572
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56572
Bug 17427: Replace CGI::Session with Data::Session

Review of attachment 56572:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17427&attachment=56572)
-----------------------------------------------------------------

Generally looks good.. minor question about using ENV though.. not sure about
that part of the change.

::: C4/Auth.pm
@@ +1111,4 @@
>                      $session->param( 'branchname',   $branchname );
>                      $session->param( 'flags',        $userflags );
>                      $session->param( 'emailaddress', $emailaddress );
> +                    $session->param( 'ip',           $ENV{REMOTE_ADDR} );

Did we test this against plack?  Can we really rely on ENV for remote_addr...
and in fact.. do we not compare the session ip to the env remote_addr in places
as a security check?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

--- Comment #9 from Tomás Cohen Arazi <[hidden email]> ---
(In reply to Martin Renvoize from comment #8)

> Comment on attachment 56572 [details] [review]
> Bug 17427: Replace CGI::Session with Data::Session
>
> Review of attachment 56572 [details] [review]:
> -----------------------------------------------------------------
>
> Generally looks good.. minor question about using ENV though.. not sure
> about that part of the change.
>
> ::: C4/Auth.pm
> @@ +1111,4 @@
> >                      $session->param( 'branchname',   $branchname );
> >                      $session->param( 'flags',        $userflags );
> >                      $session->param( 'emailaddress', $emailaddress );
> > +                    $session->param( 'ip',           $ENV{REMOTE_ADDR} );
>
> Did we test this against plack?  Can we really rely on ENV for
> remote_addr... and in fact.. do we not compare the session ip to the env
> remote_addr in places as a security check?

$ENV{REMOTE_ADDR} is correctly filled on each request by the ReverseProxy
middleware as far as I recall (I debugged plack+ENV several days before making
the packages plack integration official).

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

Tomás Cohen Arazi <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |dependency
             Status|Signed Off                  |Patch doesn't apply

--- Comment #10 from Tomás Cohen Arazi <[hidden email]> ---
Please rebase. I'd say this one depends only on Mirko's answer about packaging
Data::Session.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

Tomás Cohen Arazi <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Patch doesn't apply         |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #56572|0                           |1
        is obsolete|                            |

--- Comment #11 from Jonathan Druart <[hidden email]> ---
Created attachment 57067
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57067&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

Note that PostgreSQL is not supported yet so no need to implement it.

Test plan:
0/ The dependencies are not packaged for debian so far, so install it
via cpan
1/ Test the 3 different values for SessionStorage
2/ Using different browsers (or sessions) login into Koha with different
users. Naviguate => you should not be logged out
3/ Set SessionStorage to Memcached, stop memcached make sure that it
defaults to file.

Signed-off-by: Benjamin Rokseth <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Signed Off

--- Comment #12 from Jonathan Druart <[hidden email]> ---
I do not recommend to push this patch into the next stable release (at least
not at the beginning).

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #57067|0                           |1
        is obsolete|                            |

--- Comment #13 from Jonathan Druart <[hidden email]> ---
Created attachment 60355
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60355&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

Note that PostgreSQL is not supported yet so no need to implement it.

Test plan:
0/ The dependencies are not packaged for debian so far, so install it
via cpan
1/ Test the 3 different values for SessionStorage
2/ Using different browsers (or sessions) login into Koha with different
users. Naviguate => you should not be logged out
3/ Set SessionStorage to Memcached, stop memcached make sure that it
defaults to file.

Signed-off-by: Benjamin Rokseth <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

--- Comment #14 from Jonathan Druart <[hidden email]> ---
Just a rebase...

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
         QA Contact|[hidden email]-communit |[hidden email]
                   |y.org                       |

--- Comment #15 from Marcel de Rooy <[hidden email]> ---
QA: Looking here now

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

--- Comment #16 from Marcel de Rooy <[hidden email]> ---
(In reply to Benjamin Rokseth from comment #7)
> Works perfectly! Corrected a small typo in the PerlDependencies.
>
> No sessions lost in tempfiles, mysql or memcached, and they survived a plack
> restart.

Benjamin: What browsers did you test?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA

--- Comment #17 from Marcel de Rooy <[hidden email]> ---
This seems to break scripts like stage-marc-import and tools/upload.pl.
I am still testing a bit but after successfully uploading one file, I am not
able to upload anymore.
Also saw this error:
stage-marc-import.pl: YAML::Tiny does not support C4::BackgroundJob references
at /usr/local/share/perl/5.20.2/Data/Session/Serialize/YAML.pm line 18.,

Suspect that all scripts using BackgroungJob have issues now. Note that these
jobs append information to the session.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

--- Comment #18 from Marcel de Rooy <[hidden email]> ---
Data::Session creates a CGI object.
And we do not like that in scripts like upload-file.pl that call
check_cookie_auth (calling get_session).
The created CGI object in this case makes the upload disappear.
Other scripts may have issues too going the similar cookie_auth way..

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 17427] Replace CGI::Session with Data::Session

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17427

--- Comment #19 from Jonathan Druart <[hidden email]> ---
(In reply to Marcel de Rooy from comment #17)
> This seems to break scripts like stage-marc-import and tools/upload.pl.
> I am still testing a bit but after successfully uploading one file, I am not
> able to upload anymore.
> Also saw this error:
> stage-marc-import.pl: YAML::Tiny does not support C4::BackgroundJob
> references at /usr/local/share/perl/5.20.2/Data/Session/Serialize/YAML.pm
> line 18.,

That can be fixed using DataDumper or FreezeThaw instead of YAML as serializer.

(In reply to Marcel de Rooy from comment #18)
> Data::Session creates a CGI object.
> And we do not like that in scripts like upload-file.pl that call
> check_cookie_auth (calling get_session).
> The created CGI object in this case makes the upload disappear.
> Other scripts may have issues too going the similar cookie_auth way..

I do not know how to fix that.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Loading...