Bugzilla – Attachment 150929 Details for
Bug 17427
Replace CGI::Session with Data::Session
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17427: HACKY - force new session
Bug-17427-HACKY---force-new-session.patch (text/plain), 1.46 KB, created by
Jonathan Druart
on 2023-05-10 06:42:24 UTC
(
hide
)
Description:
Bug 17427: HACKY - force new session
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-05-10 06:42:24 UTC
Size:
1.46 KB
patch
obsolete
>From 76df7694de21dcffd6629ccb7b4143af3fa9d49d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 4 May 2023 11:15:43 +0200 >Subject: [PATCH] Bug 17427: HACKY - force new session > >Look at Data::Session->new, it's calling $self -> load_session; >Then look at load_session then user_id >=> we are retrieving the ID from the cookie > >But in our Auth.t tests we are mocking CGI->cookie to always return the >previous CGISESSID > >We should certainly adjust the test here, and remove this patch. > >194 # Note: We can test return values from checkauth here since we mocked the safe_exit after the Redirect 303 >195 is( $return[0], $patron2->userid, 'Login of patron2 approved' ); >196 isnt( $return[2], $sessionID, 'Did not return previous session ID' ); >197 ok( $return[2], 'New session ID not empty' ); >--- > C4/Auth.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 22bfe811307..6ca328ec856 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1861,7 +1861,8 @@ sub _get_session_params { > sub get_session { > my $sessionID = shift; > my $params = _get_session_params(); >- my $session = Data::Session->new( %$params, id => $sessionID ) || die $Data::Session::errstr; >+ my $session = Data::Session->new( %$params, ($sessionID ? ( id => $sessionID ) : () ) ) || die $Data::Session::errstr; >+ $session->new_session unless $sessionID; > return $session; > } > >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17427
:
56185
|
56504
|
56572
|
57067
|
60355
|
121337
|
121633
|
121657
|
121658
|
121659
|
150569
|
150570
|
150571
|
150603
|
150604
|
150605
|
150606
|
150633
|
150634
|
150635
|
150636
|
150637
|
150638
|
150639
|
150926
|
150927
|
150928
|
150929
|
150930
|
150931
|
153030
|
153031
|
153032
|
153033
|
153034
|
153035
|
153036
|
153037
|
153038
|
153039
|
153040