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

SF.net SVN: ledger-smb: [1732] trunk/scripts/login.pl



Revision: 1732
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1732&view=rev
Author:   tetragon
Date:     2007-10-10 09:32:22 -0700 (Wed, 10 Oct 2007)

Log Message:
-----------
Explicitly set the path on the LSMB cookie -- fixes Safari login

Modified Paths:
--------------
    trunk/scripts/login.pl

Modified: trunk/scripts/login.pl
===================================================================
--- trunk/scripts/login.pl	2007-10-10 15:40:49 UTC (rev 1731)
+++ trunk/scripts/login.pl	2007-10-10 16:32:22 UTC (rev 1732)
@@ -25,12 +25,15 @@
 sub authenticate {
     my ($request) = @_;
     if (!$request->{dbh}){
-        $request->{company} = 'lsmb13';
+        $request->{company} = 'ledgersmb-taxtest';
         $request->_db_init;
     }
+    my $path = $ENV{SCRIPT_NAME};
+    $path =~ s|[^/]*$||;
     if ($request->{dbh} || $request->{log_out}){
         print "Content-Type: text/html\n";
-        print "Set-Cookie: LedgerSMB=Login;\n";
+##        print "Set-Cookie: LedgerSMB=Login;\n";
+        print "Set-Cookie: LedgerSMB=Login; path=$path\n";
 	print "Status: 200 Success\n\n";
         if ($request->{log_out}){
             exit;


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