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

(-)a/C4/Auth.pm (-2 / +3 lines)
Lines 913-918 sub checkauth { Link Here
913
    login        => 1,
913
    login        => 1,
914
        INPUTS               => \@inputs,
914
        INPUTS               => \@inputs,
915
        casAuthentication    => C4::Context->preference("casAuthentication"),
915
        casAuthentication    => C4::Context->preference("casAuthentication"),
916
	remoteipcheck        => C4::Context->preference("remoteipcheck"),
916
        suggestion           => C4::Context->preference("suggestion"),
917
        suggestion           => C4::Context->preference("suggestion"),
917
        virtualshelves       => C4::Context->preference("virtualshelves"),
918
        virtualshelves       => C4::Context->preference("virtualshelves"),
918
        LibraryName          => C4::Context->preference("LibraryName"),
919
        LibraryName          => C4::Context->preference("LibraryName"),
Lines 1061-1067 sub check_api_auth { Link Here
1061
                $userid    = undef;
1062
                $userid    = undef;
1062
                $sessionID = undef;
1063
                $sessionID = undef;
1063
                return ("expired", undef, undef);
1064
                return ("expired", undef, undef);
1064
            } elsif ( $ip ne $ENV{'REMOTE_ADDR'} ) {
1065
            } elsif ( C4::Context->preference('remoteipcheck') && $ip ne $ENV{'REMOTE_ADDR'} ) {
1065
                # IP address changed
1066
                # IP address changed
1066
                $session->delete();
1067
                $session->delete();
1067
                C4::Context->_unset_userenv($sessionID);
1068
                C4::Context->_unset_userenv($sessionID);
Lines 1287-1293 sub check_cookie_auth { Link Here
1287
            $userid    = undef;
1288
            $userid    = undef;
1288
            $sessionID = undef;
1289
            $sessionID = undef;
1289
            return ("expired", undef);
1290
            return ("expired", undef);
1290
        } elsif ( $ip ne $ENV{'REMOTE_ADDR'} ) {
1291
        } elsif ( C4::Context->preference('remoteipcheck') && $ip ne $ENV{'REMOTE_ADDR'} ) {
1291
            # IP address changed
1292
            # IP address changed
1292
            $session->delete();
1293
            $session->delete();
1293
            C4::Context->_unset_userenv($sessionID);
1294
            C4::Context->_unset_userenv($sessionID);
(-)a/installer/data/mysql/en/mandatory/sysprefs.sql (+2 lines)
Lines 278-280 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
278
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ILS-DI:AuthorizedIPs','','.','Restricts usage of ILS-DI to some IPs','Free');
278
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ILS-DI:AuthorizedIPs','','.','Restricts usage of ILS-DI to some IPs','Free');
279
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OverduesBlockCirc','noblock','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','noblock|confirmation|block','Choice');
279
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OverduesBlockCirc','noblock','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','noblock|confirmation|block','Choice');
280
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('DisplayMultiPlaceHold','1','Display the ability to place multiple holds or not','','YesNo');
280
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('DisplayMultiPlaceHold','1','Display the ability to place multiple holds or not','','YesNo');
281
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('remoteipcheck','0','Check for Change in Remote IP address for Session Security . Disable when remote ip address changes frequently.','','YesNo');
282
(-)a/installer/data/mysql/updatedatabase.pl (+6 lines)
Lines 3915-3920 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
3915
    SetVersion ($DBversion);
3915
    SetVersion ($DBversion);
3916
}
3916
}
3917
3917
3918
$DBversion = '3.03.00.010';
3919
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
3920
    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('remoteipcheck','0','Check for Change in  Remote IP address for Session Security. Disable when remote ip address changes frequently.','','YesNo')");
3921
    print "Upgrade to $DBversion done adding syspref Check for Change in  Remote IP address for Session Security. Disable when remote ip address changes frequently.";
3922
    SetVersion ($DBversion);
3923
}
3918
3924
3919
3925
3920
=head1 FUNCTIONS
3926
=head1 FUNCTIONS
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref (-1 / +8 lines)
Lines 41-47 Administration: Link Here
41
                  no: "Don't allow"
41
                  no: "Don't allow"
42
            - staff and patrons to create and view saved lists of books.
42
            - staff and patrons to create and view saved lists of books.
43
    Login options:
43
    Login options:
44
        -
44
	-
45
            - pref: remoteipcheck
46
              default: 0
47
              choices:
48
                  yes: Enable
49
                  no: "Disable"
50
            - Check for Change in Remote IP address for Session Security. Disable when remote ip address changes frequently.
51
      	-
45
            - pref: insecure
52
            - pref: insecure
46
              default: 0
53
              default: 0
47
              choices:
54
              choices:
(-)a/kohaversion.pl (-2 / +1 lines)
Lines 16-22 the kohaversion is divided in 4 parts : Link Here
16
use strict;
16
use strict;
17
17
18
sub kohaversion {
18
sub kohaversion {
19
    our $VERSION = '3.03.00.009';
19
    our $VERSION = '3.03.00.010';
20
    # version needs to be set this way
20
    # version needs to be set this way
21
    # so that it can be picked up by Makefile.PL
21
    # so that it can be picked up by Makefile.PL
22
    # during install
22
    # during install
23
- 

Return to bug 5511