diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-11 05:37:58 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-11 05:37:58 +0000 |
commit | 67a247228e7204dea87eb95e32abc16a5f028da8 (patch) | |
tree | 3891a31adaeece02fc2c335d3676c26bd29a1a80 | |
parent | ce79c130c27a116c9e23d7004ad9a260d6010bfe (diff) |
Removed exec()'ing redirects
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@514 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-x | LedgerSMB/Form.pm | 15 | ||||
-rwxr-xr-x | admin.pl | 1 | ||||
-rwxr-xr-x | bin/menu.pl | 2 | ||||
-rwxr-xr-x | login.pl | 1 | ||||
-rwxr-xr-x | 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); @@ -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| <frameset cols="$menuwidth,*" border="1"> - <frame name="acc_menu" src="$form->{script}?login=$form->{login}&sessionid=$form->{sessionid}&action=acc_menu&path=$form->{path}&js=$form->{js}" /> + <frame name="acc_menu" src="menu.pl?login=$form->{login}&sessionid=$form->{sessionid}&action=acc_menu&path=$form->{path}&js=$form->{js}" /> <frame name="main_window" src="am.pl?login=$form->{login}&sessionid=$form->{sessionid}&action=$form->{main}&path=$form->{path}" /> </frameset> </html> @@ -50,6 +50,7 @@ ####################################################################### use LedgerSMB::Sysconfig; +require "common.pl"; $| = 1; @@ -56,6 +56,7 @@ use LedgerSMB::Form; use LedgerSMB::Locale; use LedgerSMB::Session; use Data::Dumper; +require "common.pl"; # for custom preprocessing logic |