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

SF.net SVN: ledger-smb: [1414] trunk/LedgerSMB



Revision: 1414
          http://svn.sourceforge.net/ledger-smb/?rev=1414&view=rev
Author:   einhverfr
Date:     2007-07-16 19:36:39 -0700 (Mon, 16 Jul 2007)

Log Message:
-----------
Fixing another cogs bug (1753360)
fix for ..hidden.. login sessions continuing to time out

Modified Paths:
--------------
    trunk/LedgerSMB/IR.pm
    trunk/LedgerSMB/Session/DB.pm

Modified: trunk/LedgerSMB/IR.pm
===================================================================
--- trunk/LedgerSMB/IR.pm	2007-07-17 02:33:57 UTC (rev 1413)
+++ trunk/LedgerSMB/IR.pm	2007-07-17 02:36:39 UTC (rev 1414)
@@ -404,7 +404,7 @@
 							     VALUES (?, ?, ?, ?,
 							            ?, ?)|;
 
-                        $sth = $dbh->prepare($query);
+                        my $sth = $dbh->prepare($query);
                         $sth->execute(
                             $ref->{trans_id},   $ref->{inventory_accno_id},
                             $linetotal,         $ref->{transdate},

Modified: trunk/LedgerSMB/Session/DB.pm
===================================================================
--- trunk/LedgerSMB/Session/DB.pm	2007-07-17 02:33:57 UTC (rev 1413)
+++ trunk/LedgerSMB/Session/DB.pm	2007-07-17 02:36:39 UTC (rev 1414)
@@ -83,8 +83,9 @@
         my ( $sessionLogin, $sessionTransaction ) = $checkQuery->fetchrow_array;
 
         my $login = $form->{login};
-        $login =~ s/[^a-zA-Z0-9._+@'-]//g;
 
+        $login =~ s/[^a-zA-Z0-9._+\@'-]//g;
+
         if (    ( $sessionLogin eq $login )
             and ( $sessionTransaction eq $transactionID ) )
         {
@@ -169,7 +170,7 @@
 # this is assuming that $form->{login} is safe, which might be a bad assumption
 # so, I'm going to remove some chars, which might make previously valid logins invalid
     my $login = $form->{login};
-    $login =~ s/[^a-zA-Z0-9._+@'-]//g;
+    $login =~ s/[^a-zA-Z0-9._+\@'-]//g;
 
     #delete any existing stale sessions with this login if they exist
     if ( !$myconfig{timeout} ) {
@@ -210,7 +211,7 @@
     my ($form) = @_;
 
     my $login = $form->{login};
-    $login =~ s/[^a-zA-Z0-9._+@'-]//g;
+    $login =~ s/[^a-zA-Z0-9._+\@'-]//g;
 
     # use the central database handle
     my $dbh = ${LedgerSMB::Sysconfig::GLOBALDBH};
@@ -235,7 +236,7 @@
 
     my ( $form, $username, $password ) = @_;
 
-    $username =~ s/[^a-zA-Z0-9._+@'-]//g;
+    $username =~ s/[^a-zA-Z0-9._+\@'-]//g;
 
     # use the central database handle
     my $dbh = ${LedgerSMB::Sysconfig::GLOBALDBH};


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