Bugzilla – Attachment 150930 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: Retrieve sessionID from HTTP_COOKIE
Bug-17427-Retrieve-sessionID-from-HTTPCOOKIE.patch (text/plain), 1.34 KB, created by
Jonathan Druart
on 2023-05-10 06:42:28 UTC
(
hide
)
Description:
Bug 17427: Retrieve sessionID from HTTP_COOKIE
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-05-10 06:42:28 UTC
Size:
1.34 KB
patch
obsolete
>From 66cbf9fee7075b07a74790f2df56ff719f255ac0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 4 May 2023 11:40:41 +0200 >Subject: [PATCH] Bug 17427: Retrieve sessionID from HTTP_COOKIE > >To make some tests pass (t/db_dependent/Auth.t) and mimick what did >CGI::Session, but that is certainly useless and the tests should be >adjusted. > >Commit modified, added ';' see comment 78 >- if ( $http_cookie && $http_cookie =~ m{CGISESSID=([^,:]*)} ) { >+ if ( $http_cookie && $http_cookie =~ m{CGISESSID=([^,:;]*)} ) { > >sessionID was "a035bf508448b8b3ecd1ca23609b90b3; bib_list=; KohaOpacLanguage=; JWT= " >--- > C4/Auth.pm | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 6ca328ec856..fb40b1ca4c8 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1861,6 +1861,12 @@ sub _get_session_params { > sub get_session { > my $sessionID = shift; > my $params = _get_session_params(); >+ unless ( $sessionID ) { >+ my $http_cookie = $ENV{HTTP_COOKIE}; >+ if ( $http_cookie && $http_cookie =~ m{CGISESSID=([^,:;]*)} ) { >+ $sessionID = $1; >+ } >+ } > 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