From 3cdcd38e07dca6144810471489cf66c4341b0e20 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Sun, 25 Nov 2007 21:07:55 +0000 Subject: Removing login variable from session creation query git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1905 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Auth/DB.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'LedgerSMB/Auth') diff --git a/LedgerSMB/Auth/DB.pm b/LedgerSMB/Auth/DB.pm index e4f5bc32..0a474af1 100755 --- a/LedgerSMB/Auth/DB.pm +++ b/LedgerSMB/Auth/DB.pm @@ -162,7 +162,7 @@ sub session_create { "INSERT INTO session (session_id, users_id, token, transaction_id) VALUES(?, (SELECT id FROM users - WHERE username = ?), ?, ?);" + WHERE username = SESSION_USER), ?, ?);" ); # this is assuming that the login is safe, which might be a bad assumption @@ -194,7 +194,7 @@ sub session_create { my ( $newSessionID, $newToken ) = $fetchSequence->fetchrow_array; #create a new session - $createNew->execute( $newSessionID, $login, $newToken, $newTransactionID ) + $createNew->execute( $newSessionID, $newToken, $newTransactionID ) || $lsmb->dberror( __FILE__ . ':' . __LINE__ . ": Create new session: \n". $lsmb->{dbh}->errstr() ); -- cgit v1.2.3