X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=login.pl;h=f761de800eac940a1bd393d7d4fcd85e37cc4b3b;hb=eef466c1d18266332c57be72f0218b28eeca203b;hp=376ea98bf070db17986a63942101fc956a70a5a3;hpb=b1f65772befd38947f5d8f1a4f30c5b17d716e4b;p=kivitendo-erp.git diff --git a/login.pl b/login.pl index 376ea98bf..f761de800 100755 --- a/login.pl +++ b/login.pl @@ -30,6 +30,10 @@ # ####################################################################### +BEGIN { + push(@INC, "modules"); +} + # setup defaults, DO NOT CHANGE $userspath = "users"; $templates = "templates"; @@ -74,54 +78,11 @@ Login disabled!\n"; exit; } -if ($form{path}) { - $form{path} =~ s/%2f/\//gi; - $form{path} =~ s/\.\.\///g; - - if ($form{path} !~ /^bin\//) { - print "content-type: text/plain - -Invalid path!\n"; - die; - } - - $ARGV[0] = "$_&script=$script"; - require "$form{path}/$script"; -} else { - - if (!$form{terminal}) { - if ($ENV{HTTP_USER_AGENT}) { - - # web browser - if ($ENV{HTTP_USER_AGENT} =~ /(mozilla|links|opera|w3m)/i) { - $form{terminal} = "mozilla"; - } +require "bin/mozilla/installationcheck.pl"; +verify_installation(); - } else { - if ($ENV{TERM} =~ /xterm/) { - $form{terminal} = "xterm"; - } - if ($ENV{TERM} =~ /(console|linux|vt.*)/i) { - $form{terminal} = "console"; - } - } - } - - if ($form{terminal}) { - - $ARGV[0] = "path=bin/$form{terminal}&script=$script"; - map { $ARGV[0] .= "&${_}=$form{$_}" } keys %form; - - require "bin/$form{terminal}/$script"; - - } else { - - print qq| - Unknown terminal - |; - } - -} +$ARGV[0] = "$_&script=$script"; +require "bin/mozilla/$script"; # end of main