Revision 06eb04eb
Von Sven Schöling vor etwa 15 Jahren hinzugefügt
login.pl | ||
---|---|---|
30 | 30 |
# |
31 | 31 |
####################################################################### |
32 | 32 |
|
33 |
use strict; |
|
34 |
|
|
33 | 35 |
BEGIN { |
34 | 36 |
unshift @INC, "modules/override"; # Use our own versions of various modules (e.g. YAML). |
35 | 37 |
push @INC, "modules/fallback"; # Only use our own versions of modules if there's no system version. |
36 | 38 |
} |
37 | 39 |
|
38 | 40 |
# setup defaults, DO NOT CHANGE |
39 |
$userspath = "users"; |
|
40 |
$templates = "templates"; |
|
41 |
$memberfile = "users/members"; |
|
42 |
$sendmail = "| /usr/sbin/sendmail -t"; |
|
41 |
$main::userspath = "users";
|
|
42 |
$main::templates = "templates";
|
|
43 |
$main::memberfile = "users/members";
|
|
44 |
$main::sendmail = "| /usr/sbin/sendmail -t";
|
|
43 | 45 |
########## end ########################################### |
44 | 46 |
|
45 | 47 |
$| = 1; |
46 | 48 |
|
47 | 49 |
use SL::LXDebug; |
48 |
$lxdebug = LXDebug->new(); |
|
50 |
$main::lxdebug = LXDebug->new();
|
|
49 | 51 |
|
50 | 52 |
eval { require "config/lx-erp.conf"; }; |
51 | 53 |
eval { require "config/lx-erp-local.conf"; } if -f "config/lx-erp-local.conf"; |
... | ... | |
62 | 64 |
$_ = $ARGV[0]; |
63 | 65 |
} |
64 | 66 |
|
65 |
%form = split /[&=]/; |
|
67 |
my %form = split /[&=]/;
|
|
66 | 68 |
|
67 | 69 |
# fix for apache 2.0 bug |
68 | 70 |
map { $form{$_} =~ s/\\$// } keys %form; |
69 | 71 |
|
70 | 72 |
# name of this script |
71 | 73 |
$0 =~ tr/\\/\//; |
72 |
$pos = rindex $0, '/'; |
|
73 |
$script = substr($0, $pos + 1); |
|
74 |
my $pos = rindex $0, '/';
|
|
75 |
my $script = substr($0, $pos + 1);
|
|
74 | 76 |
|
75 |
$form->{login} =~ s|.*/||;
|
|
77 |
$form{login} =~ s|.*/||; |
|
76 | 78 |
|
77 |
if (-e "$userspath/nologin" && $script ne 'admin.pl') { |
|
79 |
if (-e "$main::userspath/nologin" && $script ne 'admin.pl') {
|
|
78 | 80 |
print "content-type: text/plain |
79 | 81 |
|
80 | 82 |
Login disabled!\n"; |
Auch abrufbar als: Unified diff
login strict