CLOUDSTACK-1655: A regression in ConsoleProxy caused by deprecating old URL form

This commit is contained in:
Kelven Yang 2013-03-12 17:26:10 -07:00
parent d55560a627
commit bf15eb0c7f

View File

@ -50,9 +50,10 @@ public class ConsoleProxyHttpHandlerHelper {
ConsoleProxyPasswordBasedEncryptor encryptor = new ConsoleProxyPasswordBasedEncryptor(
ConsoleProxy.getEncryptorPassword());
ConsoleProxyClientParam param = encryptor.decryptObject(ConsoleProxyClientParam.class, map.get("token"));
// make sure we get information from token only
map.clear();
ConsoleProxyClientParam param = encryptor.decryptObject(ConsoleProxyClientParam.class, map.get("token"));
if(param != null) {
if(param.getClientHostAddress() != null)
map.put("host", param.getClientHostAddress());