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

SF.net SVN: ledger-smb: [975] branches/1.2/LedgerSMB



Revision: 975
          http://svn.sourceforge.net/ledger-smb/?rev=975&view=rev
Author:   einhverfr
Date:     2007-03-21 00:11:56 -0700 (Wed, 21 Mar 2007)

Log Message:
-----------
Fixed emailing

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

Modified: branches/1.2/LedgerSMB/Form.pm
===================================================================
--- branches/1.2/LedgerSMB/Form.pm	2007-03-21 06:37:25 UTC (rev 974)
+++ branches/1.2/LedgerSMB/Form.pm	2007-03-21 07:11:56 UTC (rev 975)
@@ -38,6 +38,7 @@
 use List::Util qw(first);
 use LedgerSMB::Mailer;
 use Time::Local;
+use Cwd;
 
 package Form;
 
@@ -86,16 +87,13 @@
 
 	if ($self->{path} ne 'bin/lynx'){ $self->{path} = 'bin/mozilla';}	
 
-	if (($self->{script} =~ m#(..|\\|/)#)){
-		$self->error("Access Denied");
-	}
-	if (($self->{script}) and not first {$_ eq $self->{script}} 
+	if (($self->{script}) and not List::Util::first {$_ eq $self->{script}} 
 					@{LedgerSMB::Sysconfig::scripts}){
-		$self->error('Access Denied');
+		$self->error('Access Denied', __line__, __file__);
 	}
 
 	if (($self->{action} =~ /:/) || ($self->{nextsub} =~ /:/)){
-		$self->error("Access Denied");
+		$self->error("Access Denied", __line__, __file__);
 	}
 
 	for (keys %$self){ $self->{$_} =~ s/\000//g }
@@ -592,6 +590,8 @@
 
 	my ($self, $myconfig) = @_;
 
+	$self->{cwd} = Cwd::getcwd();
+
 	my ($chars_per_line, $lines_on_first_page, $lines_on_second_page) = (0, 0, 0);
 	my ($current_page, $current_line) = (1, 1);
 	my $pagebreak = "";

Modified: branches/1.2/LedgerSMB/Session/DB.pm
===================================================================
--- branches/1.2/LedgerSMB/Session/DB.pm	2007-03-21 06:37:25 UTC (rev 974)
+++ branches/1.2/LedgerSMB/Session/DB.pm	2007-03-21 07:11:56 UTC (rev 975)
@@ -227,7 +227,6 @@
 	$fetchPassword->execute($username) || $form->dberror(__FILE__.':'.__LINE__.': Fetching password : ');
 
 	my ($dbusername, $md5Password, $cryptPassword) = $fetchPassword->fetchrow_array;
-
 	if ($dbusername ne $username) {
 		# User data retrieved from db not for the requested user
 		return 0;


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