From 06a4a4f4b70916f37be7214734d1147afd1f541e Mon Sep 17 00:00:00 2001 From: tetragon Date: Wed, 10 Oct 2007 16:32:22 +0000 Subject: Explicitly set the path on the LSMB cookie -- fixes Safari login git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1732 4979c152-3d1c-0410-bac9-87ea11338e46 --- scripts/login.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/login.pl b/scripts/login.pl index 31d2922f..30a6eed3 100644 --- a/scripts/login.pl +++ b/scripts/login.pl @@ -25,12 +25,15 @@ sub __default { 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; -- cgit v1.2.3