Bug 9569: Security patch for AutoLocation
If a patron is not allowed to access the staff interface because its IP
address in the authorised range of IPs, the cookie should not contain
the CGISESSID.
If it is, the patron is logged in and will be able to access the staff
interface if he reload the page (or hit another one).
Test plan:
Confirm the that AutoLocation feature is now working as expected.
Note: It seems that this feature has never really worked as intended.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 93cc0956a9)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This commit is contained in:
parent
bb39ed1028
commit
23d3ca374f
|
|
@ -1083,6 +1083,11 @@ sub checkauth {
|
|||
$domain =~ s|\.\*||g;
|
||||
if ( $ip !~ /^$domain/ ) {
|
||||
$loggedin = 0;
|
||||
$cookie = $query->cookie(
|
||||
-name => 'CGISESSID',
|
||||
-value => '',
|
||||
-HttpOnly => 1
|
||||
);
|
||||
$info{'wrongip'} = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue