From 67a247228e7204dea87eb95e32abc16a5f028da8 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Sat, 11 Nov 2006 05:37:58 +0000 Subject: Removed exec()'ing redirects git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@514 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Form.pm | 15 +++++++-------- admin.pl | 1 + bin/menu.pl | 2 +- login.pl | 1 + menu.pl | 1 + 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index c9af2d1e..d514adf7 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -43,15 +43,18 @@ sub new { my $type = shift; - my $self = {}; + my $argstr = shift; read(STDIN, $_, $ENV{CONTENT_LENGTH}); - if ($ENV{QUERY_STRING}) { + if ($argstr){ + $_ = $argstr; + } + elsif ($ENV{QUERY_STRING}) { $_ = $ENV{QUERY_STRING}; } - if ($ARGV[0]) { + elsif ($ARGV[0]) { $_ = $ARGV[0]; } @@ -321,11 +324,7 @@ sub redirect { if ($self->{callback}) { - my ($script, $argv) = split(/\?/, $self->{callback}); - $self->error($locale->text("Invalid redirect")) unless - first {$_ eq $script} @{LedgerSMB::Sysconfig::scripts}; - exec ("perl", $script, $argv); - + main::redirect(); } else { $self->info($msg); diff --git a/admin.pl b/admin.pl index b8551e04..a3b9de31 100755 --- a/admin.pl +++ b/admin.pl @@ -49,6 +49,7 @@ ####################################################################### use LedgerSMB::Sysconfig; +require "common.pl"; $| = 1; diff --git a/bin/menu.pl b/bin/menu.pl index 1a25014e..c44da8be 100755 --- a/bin/menu.pl +++ b/bin/menu.pl @@ -56,7 +56,7 @@ sub display { print qq| - + diff --git a/login.pl b/login.pl index 993f008a..ff1cba7e 100755 --- a/login.pl +++ b/login.pl @@ -50,6 +50,7 @@ ####################################################################### use LedgerSMB::Sysconfig; +require "common.pl"; $| = 1; diff --git a/menu.pl b/menu.pl index f1adbb58..b55144ec 100755 --- a/menu.pl +++ b/menu.pl @@ -56,6 +56,7 @@ use LedgerSMB::Form; use LedgerSMB::Locale; use LedgerSMB::Session; use Data::Dumper; +require "common.pl"; # for custom preprocessing logic -- cgit v1.2.3