I stumbled about that thing.
I think there is a problem for resolving the right IP for "SERVER_IP".
The "SERVER_IP" thing is resolved in the constructor of the PortalImpl class:
....
_computerName = System.getProperty("env.COMPUTERNAME");
if (Validator.isNull(_computerName)) {
_computerName = System.getProperty("env.HOST");
}
if (Validator.isNull(_computerName)) {
_computerName = System.getProperty("env.HOSTNAME");
}
if (Validator.isNull(_computerName)) {
try {
_computerName = InetAddress.getLocalHost().getHostName();
}
catch (UnknownHostException uhe) {
}
}
try {
_computerAddress = InetAddress.getByName(
_computerName).getHostAddress();
}
....
On my system this resolves the IP for "myhost", which is 127.0.0.1. Because this is the normal setting of a linux system in the /etc/hosts file:
127.0.0.1 localhost myhost
Therefore the SERVER_IP is resolved as "127.0.0.1".
But when a user accesses the portal by "myhost.mydomain.com", the comparison of the IP for "myhost.mydomain.com" (eg. 192.168.0.20) and SERVER_IP (127.0.0.1) is false.
So the method escapeRedirect of the PortalImpl class returns "null".
I don't know what a proper solution is.
Here are some possible solutions that I can think of:
- You have to remove "myhost" from "/etc/hosts"
- You have to add the official IP of the server to redirect.url.ips.allowed. But if you run your portal behind a firewall which forwards a official IP to something private (10.0.0.0, 192.168.0.0 etc.) adding the server IP (which might be something like this 10.10.6.5) does not solve this. You also have to add the IP that is used to access the portal from the internet.
- You set "env.COMPUTERNAME", "env.HOST" or "env.HOSTNAME" to "myhost.mydomain.com".
Please sign in to flag this as inappropriate.