Skip to content
Snippets Groups Projects
Commit 4c7c760d authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

configuration parameter renaming

parent d1590338
Branches
Tags
No related merge requests found
...@@ -12,7 +12,7 @@ templates_theme = edugain ...@@ -12,7 +12,7 @@ templates_theme = edugain
accounts_file = /var/lib/access-check/accounts.php accounts_file = /var/lib/access-check/accounts.php
[status] [status]
allow = 127.0.0.1, ::1, 10.45.0.0/16 allowed = 127.0.0.1, ::1, 10.45.0.0/16
disabled = 0 disabled = 0
[federations] [federations]
......
...@@ -709,8 +709,8 @@ sub req_status { ...@@ -709,8 +709,8 @@ sub req_status {
Net::IP->require(); Net::IP->require();
my $source_ip_string = get_source_address(); my $source_ip_string = get_source_address();
my $source_ip = Net::IP->new($source_ip_string); my $source_ip = Net::IP->new($source_ip_string);
my @allowed_ips_strings = $self->{configuration}->{status}->{allow} ? my @allowed_ips_strings = $self->{configuration}->{status}->{allowed} ?
split(/, */, $self->{configuration}->{status}->{allow}) : (); split(/, */, $self->{configuration}->{status}->{allowed}) : ();
my @allowed_ips = map { Net::IP->new($_) } @allowed_ips_strings; my @allowed_ips = map { Net::IP->new($_) } @allowed_ips_strings;
if (any { $_->overlaps($source_ip) } @allowed_ips) { if (any { $_->overlaps($source_ip) } @allowed_ips) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment