Bugzilla – Attachment 63376 Details for
Bug 18578
Use subdirectory in /tmp for session storage during installation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18578: Use subdirectory in /tmp for session storage during installation
Bug-18578-Use-subdirectory-in-tmp-for-session-stor.patch (text/plain), 2.18 KB, created by
Marcel de Rooy
on 2017-05-11 07:39:23 UTC
(
hide
)
Description:
Bug 18578: Use subdirectory in /tmp for session storage during installation
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-05-11 07:39:23 UTC
Size:
2.18 KB
patch
obsolete
>From a523d12ee64f4678ce5261597b6a76043d4d68e8 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 11 May 2017 09:10:50 +0200 >Subject: [PATCH] Bug 18578: Use subdirectory in /tmp for session storage > during installation >Content-Type: text/plain; charset=utf-8 > >Apply the change from bug 15553 to InstallAuth.pm too. > >Test plan: >[1] Remove all cgisess_* files from your /tmp directory. >[2] Remove directory /tmp/cgisess_koha_[your instance], if there. >[3] Run the webinstaller > /cgi-bin/koha/installer/install.pl?step=1&op=updatestructure >[4] Check if you have cgisess_ files in /tmp/cgisess_koha_[your instance]. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/InstallAuth.pm | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/C4/InstallAuth.pm b/C4/InstallAuth.pm >index 6851214..9c6795f 100644 >--- a/C4/InstallAuth.pm >+++ b/C4/InstallAuth.pm >@@ -20,6 +20,7 @@ package C4::InstallAuth; > use strict; > #use warnings; FIXME - Bug 2505 > use Digest::MD5 qw(md5_base64); >+use File::Spec; > > require Exporter; > use C4::Context; >@@ -233,6 +234,7 @@ sub checkauth { > my $dbh = C4::Context->dbh(); > my $template_name; > $template_name = "installer/auth.tt"; >+ my $sessdir = File::Spec->catdir( File::Spec->tmpdir, 'cgisess_' . C4::Context->config('database') ); # same construction as in C4/Auth > > # state variables > my $loggedin = 0; >@@ -243,7 +245,7 @@ sub checkauth { > C4::Context->_new_userenv($sessionID); > my $session = > new CGI::Session( "driver:File;serializer:yaml", $sessionID, >- { Directory => '/tmp' } ); >+ { Directory => $sessdir } ); > if ( $session->param('cardnumber') ) { > C4::Context->set_userenv( > $session->param('number'), >@@ -283,7 +285,7 @@ sub checkauth { > } > unless ($userid) { > my $session = >- new CGI::Session( "driver:File;serializer:yaml", undef, { Directory => '/tmp' } ); >+ new CGI::Session( "driver:File;serializer:yaml", undef, { Directory => $sessdir } ); > $sessionID = $session->id; > $userid = $query->param('userid'); > C4::Context->_new_userenv($sessionID); >-- >2.1.4
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 18578
:
63376
|
63423
|
63541