|
Lines 20-25
package C4::InstallAuth;
Link Here
|
| 20 |
use strict; |
20 |
use strict; |
| 21 |
#use warnings; FIXME - Bug 2505 |
21 |
#use warnings; FIXME - Bug 2505 |
| 22 |
use Digest::MD5 qw(md5_base64); |
22 |
use Digest::MD5 qw(md5_base64); |
|
|
23 |
use File::Spec; |
| 23 |
|
24 |
|
| 24 |
require Exporter; |
25 |
require Exporter; |
| 25 |
use C4::Context; |
26 |
use C4::Context; |
|
Lines 233-238
sub checkauth {
Link Here
|
| 233 |
my $dbh = C4::Context->dbh(); |
234 |
my $dbh = C4::Context->dbh(); |
| 234 |
my $template_name; |
235 |
my $template_name; |
| 235 |
$template_name = "installer/auth.tt"; |
236 |
$template_name = "installer/auth.tt"; |
|
|
237 |
my $sessdir = File::Spec->catdir( File::Spec->tmpdir, 'cgisess_' . C4::Context->config('database') ); # same construction as in C4/Auth |
| 236 |
|
238 |
|
| 237 |
# state variables |
239 |
# state variables |
| 238 |
my $loggedin = 0; |
240 |
my $loggedin = 0; |
|
Lines 243-249
sub checkauth {
Link Here
|
| 243 |
C4::Context->_new_userenv($sessionID); |
245 |
C4::Context->_new_userenv($sessionID); |
| 244 |
my $session = |
246 |
my $session = |
| 245 |
new CGI::Session( "driver:File;serializer:yaml", $sessionID, |
247 |
new CGI::Session( "driver:File;serializer:yaml", $sessionID, |
| 246 |
{ Directory => '/tmp' } ); |
248 |
{ Directory => $sessdir } ); |
| 247 |
if ( $session->param('cardnumber') ) { |
249 |
if ( $session->param('cardnumber') ) { |
| 248 |
C4::Context->set_userenv( |
250 |
C4::Context->set_userenv( |
| 249 |
$session->param('number'), |
251 |
$session->param('number'), |
|
Lines 283-289
sub checkauth {
Link Here
|
| 283 |
} |
285 |
} |
| 284 |
unless ($userid) { |
286 |
unless ($userid) { |
| 285 |
my $session = |
287 |
my $session = |
| 286 |
new CGI::Session( "driver:File;serializer:yaml", undef, { Directory => '/tmp' } ); |
288 |
new CGI::Session( "driver:File;serializer:yaml", undef, { Directory => $sessdir } ); |
| 287 |
$sessionID = $session->id; |
289 |
$sessionID = $session->id; |
| 288 |
$userid = $query->param('userid'); |
290 |
$userid = $query->param('userid'); |
| 289 |
C4::Context->_new_userenv($sessionID); |
291 |
C4::Context->_new_userenv($sessionID); |
| 290 |
- |
|
|