summaryrefslogtreecommitdiff
path: root/LedgerSMB/Auth
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-11-23 03:23:17 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-11-23 03:23:17 +0000
commit6a7a141363fc99215e363010e3c7dbe5e4e890c4 (patch)
treeb8d777b8890a9737ecf7e49591e0e7e6e621c66f /LedgerSMB/Auth
parente66442aedfc08147d4cd86706e53ebc4198844c6 (diff)
Adding more info to an error message
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1894 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/Auth')
-rwxr-xr-xLedgerSMB/Auth/DB.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/LedgerSMB/Auth/DB.pm b/LedgerSMB/Auth/DB.pm
index 1c554a3b..e4f5bc32 100755
--- a/LedgerSMB/Auth/DB.pm
+++ b/LedgerSMB/Auth/DB.pm
@@ -34,13 +34,11 @@ use strict;
sub session_check {
use Time::HiRes qw(gettimeofday);
my ( $cookie, $form ) = @_;
- print STDERR "Checking Session\n";
my $path = ($ENV{SCRIPT_NAME});
$path =~ s|[^/]*$||;
if ($cookie eq 'Login'){
- print STDERR "creating session\n";
return session_create($form);
}
my $timeout;
@@ -132,7 +130,6 @@ sub session_check {
sub session_create {
my ($lsmb) = @_;
- print STDERR "Creating Session\n";
my $path = ($ENV{SCRIPT_NAME});
$path =~ s|[^/]*$||;
use Time::HiRes qw(gettimeofday);
@@ -198,7 +195,8 @@ sub session_create {
#create a new session
$createNew->execute( $newSessionID, $login, $newToken, $newTransactionID )
- || $lsmb->dberror( __FILE__ . ':' . __LINE__ . ': Create new session: ' );
+ || $lsmb->dberror( __FILE__ . ':' . __LINE__ . ": Create new session: \n".
+ $lsmb->{dbh}->errstr() );
#reseed the random number generator
my $randomSeed = 1.0 * ( '0.' . ( time() ^ ( $$ + ( $$ << 15 ) ) ) );
@@ -210,7 +208,7 @@ sub session_create {
my $newCookieValue = $newSessionID . ':' . $newToken . ':'
. $lsmb->{company};
- print STDERR "Breakpoint\n";
+
#now set the cookie in the browser
#TODO set domain from ENV, also set path to install path
print qq|Set-Cookie: LedgerSMB=$newCookieValue; path=$path;\n|;