View | Details | Raw Unified | Return to bug 36940
Collapse All | Expand All

(-)a/C4/Auth.pm (-3 / +2 lines)
Lines 1218-1227 sub checkauth { Link Here
1218
                        my $branches = { map { $_->branchcode => $_->unblessed } Koha::Libraries->search->as_list };
1218
                        my $branches = { map { $_->branchcode => $_->unblessed } Koha::Libraries->search->as_list };
1219
                        if ( C4::Context->preference('StaffLoginRestrictLibraryByIP') ) {
1219
                        if ( C4::Context->preference('StaffLoginRestrictLibraryByIP') ) {
1220
                            # we have to check they are coming from the right ip range
1220
                            # we have to check they are coming from the right ip range
1221
                            my $domain = $branches->{$branchcode}->{'branchip'};
1221
                            my $domain = $branches->{$branchcode}->{'branchip'} // q{};
1222
                            $domain =~ s|\.\*||g;
1222
                            $domain =~ s|\.\*||g;
1223
                            $domain =~ s/\s+//g;
1223
                            $domain =~ s/\s+//g;
1224
                            if ( $ip !~ /^$domain/ ) {
1224
                            if ( $domain && $ip !~ /^$domain/ ) {
1225
                                $cookie = $cookie_mgr->replace_in_list( $cookie, $query->cookie(
1225
                                $cookie = $cookie_mgr->replace_in_list( $cookie, $query->cookie(
1226
                                    -name     => 'CGISESSID',
1226
                                    -name     => 'CGISESSID',
1227
                                    -value    => '',
1227
                                    -value    => '',
1228
- 

Return to bug 36940