Lines 1009-1014
sub checkauth {
Link Here
|
1009 |
login => 1, |
1009 |
login => 1, |
1010 |
INPUTS => \@inputs, |
1010 |
INPUTS => \@inputs, |
1011 |
casAuthentication => C4::Context->preference("casAuthentication"), |
1011 |
casAuthentication => C4::Context->preference("casAuthentication"), |
|
|
1012 |
SessionRestrictionByIP => C4::Context->preference("SessionRestrictionByIP"), |
1012 |
suggestion => C4::Context->preference("suggestion"), |
1013 |
suggestion => C4::Context->preference("suggestion"), |
1013 |
virtualshelves => C4::Context->preference("virtualshelves"), |
1014 |
virtualshelves => C4::Context->preference("virtualshelves"), |
1014 |
LibraryName => "" . C4::Context->preference("LibraryName"), |
1015 |
LibraryName => "" . C4::Context->preference("LibraryName"), |
Lines 1188-1194
sub check_api_auth {
Link Here
|
1188 |
$userid = undef; |
1189 |
$userid = undef; |
1189 |
$sessionID = undef; |
1190 |
$sessionID = undef; |
1190 |
return ("expired", undef, undef); |
1191 |
return ("expired", undef, undef); |
1191 |
} elsif ( $ip ne $ENV{'REMOTE_ADDR'} ) { |
1192 |
} elsif ( C4::Context->preference('SessionRestrictionByIP') && $ip ne $ENV{'REMOTE_ADDR'} ) { |
1192 |
# IP address changed |
1193 |
# IP address changed |
1193 |
$session->delete(); |
1194 |
$session->delete(); |
1194 |
C4::Context->_unset_userenv($sessionID); |
1195 |
C4::Context->_unset_userenv($sessionID); |
Lines 1427-1433
sub check_cookie_auth {
Link Here
|
1427 |
$userid = undef; |
1428 |
$userid = undef; |
1428 |
$sessionID = undef; |
1429 |
$sessionID = undef; |
1429 |
return ("expired", undef); |
1430 |
return ("expired", undef); |
1430 |
} elsif ( $ip ne $ENV{'REMOTE_ADDR'} ) { |
1431 |
} elsif ( C4::Context->preference('SessionRestrictionByIP') && $ip ne $ENV{'REMOTE_ADDR'} ) { |
1431 |
# IP address changed |
1432 |
# IP address changed |
1432 |
$session->delete(); |
1433 |
$session->delete(); |
1433 |
C4::Context->_unset_userenv($sessionID); |
1434 |
C4::Context->_unset_userenv($sessionID); |