diff options
-rwxr-xr-x | LedgerSMB/Form.pm | 4 | ||||
-rwxr-xr-x | menu.pl | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 49bc3d7d..05044b99 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -65,6 +65,8 @@ sub new { if (substr($self->{action}, 0, 1) !~ /( |\.)/) { $self->{action} = lc $self->{action}; $self->{action} =~ s/( |-|,|\#|\/|\.$)/_/g; + $self->{nextsub} = lc $self->{nextsub}; + $self->{nextsub} =~ s/( |-|,|\#|\/|\.$)/_/g; } $self->{menubar} = 1 if $self->{path} =~ /lynx/i; @@ -76,7 +78,7 @@ sub new { bless $self, $type; - if ($self->{action} =~ /:/){ + if (($self->{action} =~ /:/) || ($self->{nextsub} =~ /:/)){ $self->error("Access Denied"); } $self; @@ -137,11 +137,7 @@ if ($form->{action}) { &check_password; - if (substr($form->{action}, 0, 1) =~ /( |\.)/) { - &{ $form->{nextsub} }; - } else { - &{ $form->{action} }; - } + &{ $form->{action} }; } else { $form->error(__FILE__.':'.__LINE__.': '.$locale->text('action= not defined!')); |