diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/LedgerSMB.pm b/LedgerSMB.pm index 37fbe009f8..ee84972308 100755 --- a/LedgerSMB.pm +++ b/LedgerSMB.pm @@ -125,17 +125,17 @@ sub new { $self->{action} =~ s/\W/_/g; $self->{action} = lc $self->{action}; - if ($self->{path} =~ /lynx/i){ + + if ($self->{path} eq "bin/lynx"){ $self->{menubar} = 1; #menubar will be deprecated, replaced with below $self->{lynx} = 1; - } + $self->{path} = "bin/lynx"; + } else { + $self->{path} = "bin/mozilla"; - $self->{path} =~ s#\\#/#g; - if (($self->{path}) && ($self->{path} !~ m#^bin/#) - || ($self->{path} =~ m#(\w*/){2,}#)){ - $self->error("Access Denied"); } + if (($self->{script} =~ m#(..|\\|/)#)){ $self->error("Access Denied"); } diff --git a/doc/COPYRIGHT b/doc/COPYRIGHT old mode 100755 new mode 100644 diff --git a/doc/README b/doc/README old mode 100755 new mode 100644 diff --git a/doc/faq.html b/doc/faq.html old mode 100755 new mode 100644 diff --git a/favicon.ico b/favicon.ico old mode 100755 new mode 100644 diff --git a/login.pl b/login.pl index ff1cba7ebc..a9608a18d9 100755 --- a/login.pl +++ b/login.pl @@ -86,28 +86,9 @@ # exit; #} +$ARGV[0] = $_; +require "bin/$script"; -if ($form{path}) { - - if ($form{path} ne 'bin/lynx'){ $form{path} = 'bin/mozilla';} - - $ARGV[0] = "$_&script=$script"; - require "bin/$script"; - -} else { - - $form{terminal} = "lynx"; - - if ($ENV{HTTP_USER_AGENT} !~ /lynx/i) { - $form{terminal} = "mozilla"; - } - - $ARGV[0] = "path=bin/$form{terminal}&script=$script"; - map { $ARGV[0] .= "&${_}=$form{$_}" } keys %form; - - require "bin/$script"; - -} # end of main