mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-23 18:03:11 +00:00
DS-1192 new property to skip XMLUI ip checks during login
This commit is contained in:
@@ -247,8 +247,11 @@ public class AuthenticationUtil
|
|||||||
|
|
||||||
if (id != null)
|
if (id != null)
|
||||||
{
|
{
|
||||||
|
// Should we check for an ip match from the start of the request to now?
|
||||||
|
boolean ipcheck = ConfigurationManager.getBooleanProperty("xmlui.session.ipcheck", true);
|
||||||
|
|
||||||
String address = (String)session.getAttribute(CURRENT_IP_ADDRESS);
|
String address = (String)session.getAttribute(CURRENT_IP_ADDRESS);
|
||||||
if (address != null && address.equals(request.getRemoteAddr()))
|
if (!ipcheck || (address != null && address.equals(request.getRemoteAddr())))
|
||||||
{
|
{
|
||||||
EPerson eperson = EPerson.find(context, id);
|
EPerson eperson = EPerson.find(context, id);
|
||||||
context.setCurrentUser(eperson);
|
context.setCurrentUser(eperson);
|
||||||
|
@@ -1589,6 +1589,14 @@ webui.suggest.enable = false
|
|||||||
# process. The default value is false, i.e. no one may assume the login of another user.
|
# process. The default value is false, i.e. no one may assume the login of another user.
|
||||||
#xmlui.user.assumelogin = true
|
#xmlui.user.assumelogin = true
|
||||||
|
|
||||||
|
# Check if the user has a consistent ip address from the start of the login process
|
||||||
|
# to the end of the login process. Disabling this check is not recommended unless
|
||||||
|
# absolutely necessary as the ip check can be helpful for preventing session
|
||||||
|
# hijacking. Possible reasons to set this to false: many-to-many wireless networks
|
||||||
|
# that prevent consistent ip addresses or complex proxying of requests.
|
||||||
|
# The default value is set to true.
|
||||||
|
#xmlui.session.ipcheck = true
|
||||||
|
|
||||||
# After a user has logged into the system, which url should they be directed too?
|
# After a user has logged into the system, which url should they be directed too?
|
||||||
# Leave this parameter blank or undefined to direct users to the homepage, or
|
# Leave this parameter blank or undefined to direct users to the homepage, or
|
||||||
# "/profile" for the user's profile, or another reasonable choice is "/submissions"
|
# "/profile" for the user's profile, or another reasonable choice is "/submissions"
|
||||||
|
Reference in New Issue
Block a user