Skip to content

Commit ddefdbf

Browse files
committed
Disable acceptence of old-fashion URL form for console access
1 parent 889e76b commit ddefdbf

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎console-proxy/src/com/cloud/consoleproxy/ConsoleProxyHttpHandlerHelper.java‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ public static Map<String, String> getQueryMap(String query) {
4949
if(map.get("token") != null) {
5050
ConsoleProxyPasswordBasedEncryptor encryptor = new ConsoleProxyPasswordBasedEncryptor(
5151
ConsoleProxy.getEncryptorPassword());
52-
52+
53+
// make sure we get information from token only
54+
map.clear();
5355
ConsoleProxyClientParam param = encryptor.decryptObject(ConsoleProxyClientParam.class, map.get("token"));
5456
if(param != null) {
5557
if(param.getClientHostAddress() != null)
@@ -67,6 +69,9 @@ public static Map<String, String> getQueryMap(String query) {
6769
if(param.getTicket() != null)
6870
map.put("ticket", param.getTicket());
6971
}
72+
} else {
73+
// we no longer accept information from parameter other than token
74+
map.clear();
7075
}
7176

7277
return map;

0 commit comments

Comments
 (0)