diff options
author | christopherm <christopherm@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-12-07 20:25:26 +0000 |
---|---|---|
committer | christopherm <christopherm@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-12-07 20:25:26 +0000 |
commit | ca86bb11388b5d22ec2e63088d87ca27f17ea530 (patch) | |
tree | 16b7e0b4b74fa480e1093206829c8d190ed5ba49 | |
parent | 7d048ab4e86749468366abc175169fd73cbb712c (diff) |
removing if ($myconfig{password}) clause, as I cannot see why one would want this
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@743 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-x | menu.pl | 51 |
1 files changed, 24 insertions, 27 deletions
@@ -152,39 +152,36 @@ if ($form->{action}) { sub check_password { - if ($myconfig{password}) { + require "bin/pw.pl"; - require "bin/pw.pl"; - - if ($form->{password}) { - if (! Session::password_check($form, $form->{login}, $form->{password})) { - if ($ENV{HTTP_USER_AGENT}) { - &getpassword; - } else { - $form->error(__FILE__.':'.__LINE__.': '.$locale->text('Access Denied!')); - } - exit; + if ($form->{password}) { + if (! Session::password_check($form, $form->{login}, $form->{password})) { + if ($ENV{HTTP_USER_AGENT}) { + &getpassword; } else { - Session::session_create($form); + $form->error(__FILE__.':'.__LINE__.': '.$locale->text('Access Denied!')); } - + exit; } else { - if ($ENV{HTTP_USER_AGENT}) { - $ENV{HTTP_COOKIE} =~ s/;\s*/;/g; - @cookies = split /;/, $ENV{HTTP_COOKIE}; - foreach (@cookies) { - ($name,$value) = split /=/, $_, 2; - $cookie{$name} = $value; - } - - #check for valid session - if(!Session::session_check($cookie{"LedgerSMB"}, $form)){ - &getpassword(1); - exit; - } - } else { + Session::session_create($form); + } + + } else { + if ($ENV{HTTP_USER_AGENT}) { + $ENV{HTTP_COOKIE} =~ s/;\s*/;/g; + @cookies = split /;/, $ENV{HTTP_COOKIE}; + foreach (@cookies) { + ($name,$value) = split /=/, $_, 2; + $cookie{$name} = $value; + } + + #check for valid session + if(!Session::session_check($cookie{"LedgerSMB"}, $form)){ + &getpassword(1); exit; } + } else { + exit; } } } |