private boolean isRedirectHostTheSameAsLocalHost ( String exitPage , String logoutURLhost , String hostFullName , String shortName , String ipAddress ) { String localHostIpAddress = "127.0.0.1" ; boolean acceptURL = false ; if ( logoutURLhost . equalsIgnoreCase ( "localhost" ) || logoutURLhost . equals ( localHostIpAddress ) || ( hostFullName != null && logoutURLhost . equalsIgnoreCase ( hostFullName ) ) || ( shortName != null && logoutURLhost . equalsIgnoreCase ( shortName ) ) || ( ipAddress != null && logoutURLhost . equals ( ipAddress ) ) ) { acceptURL = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "exitPage points to this host: all ok" ) ; } return acceptURL ; }
Check the logout URL host name with various combination of shortName full name and ipAddress .