Changed ip groups to support more ip addresses and be more forgiving about formatting.
This commit is contained in:
parent
73ff7fb959
commit
de1d5834ac
3 changed files with 6 additions and 1 deletions
|
|
@ -236,6 +236,10 @@ sub isInGroup {
|
|||
%group = WebGUI::SQL->quickHash("select karmaThreshold,ipFilter from groups where groupId='$gid'");
|
||||
### Check IP Address
|
||||
if ($group{ipFilter} ne "") {
|
||||
$group{ipFilter} =~ s/\t//g;
|
||||
$group{ipFilter} =~ s/\r//g;
|
||||
$group{ipFilter} =~ s/\n//g;
|
||||
$group{ipFilter} =~ s/\s//g;
|
||||
my @ips = split(";",$group{ipFilter});
|
||||
foreach my $ip (@ips) {
|
||||
if ($session{env}{REMOTE_ADDR} =~ /^$ip/) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue