[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[2844] branches/1.2/LedgerSMB/Session/DB.pm



Revision: 2844
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2844&view=rev
Author:   einhverfr
Date:     2010-01-23 19:41:15 +0000 (Sat, 23 Jan 2010)

Log Message:
-----------
Fixing 'Cannot prepare empty statement' error

Modified Paths:
--------------
    branches/1.2/LedgerSMB/Session/DB.pm

Modified: branches/1.2/LedgerSMB/Session/DB.pm
===================================================================
--- branches/1.2/LedgerSMB/Session/DB.pm	2010-01-23 01:54:35 UTC (rev 2843)
+++ branches/1.2/LedgerSMB/Session/DB.pm	2010-01-23 19:41:15 UTC (rev 2844)
@@ -114,7 +114,13 @@
 
 #something's wrong, they have the cookie, but wrong user or the wrong transaction id. Hijack attempt?
 #destroy the session
-            my $sessionDestroy = $dbh->prepare("");
+             my $deleteExisting = $dbh->prepare(
+                 "DELETE 
+		   FROM session
+		  WHERE session.users_id 
+                        = (select id from users where username = ?)"
+		        );
+             $deleteExisting->execute($myconfig->{login});
 
             #delete the cookie in the browser
             print qq|Set-Cookie: LedgerSMB=; path=/;\n|;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.