cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [28/38] git commit: refs/heads/ui-multiple-nics - Disable acceptence of old-fashion URL form for console access
Date Fri, 08 Mar 2013 19:37:49 GMT
Disable acceptence of old-fashion URL form for console access


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/37bab18c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/37bab18c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/37bab18c

Branch: refs/heads/ui-multiple-nics
Commit: 37bab18c68fdb3492429c7d935958d774cb60205
Parents: 409ec9c
Author: Kelven Yang <kelveny@gmail.com>
Authored: Thu Mar 7 18:39:33 2013 -0800
Committer: Kelven Yang <kelveny@gmail.com>
Committed: Thu Mar 7 18:39:48 2013 -0800

----------------------------------------------------------------------
 .../ConsoleProxyHttpHandlerHelper.java             |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/37bab18c/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyHttpHandlerHelper.java
----------------------------------------------------------------------
diff --git a/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyHttpHandlerHelper.java
b/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyHttpHandlerHelper.java
index 7756d01..7f79bae 100644
--- a/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyHttpHandlerHelper.java
+++ b/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxyHttpHandlerHelper.java
@@ -49,7 +49,9 @@ public class ConsoleProxyHttpHandlerHelper {
         if(map.get("token") != null) {
             ConsoleProxyPasswordBasedEncryptor encryptor = new ConsoleProxyPasswordBasedEncryptor(
                 ConsoleProxy.getEncryptorPassword());
-            
+    
+            // 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)
@@ -67,6 +69,9 @@ public class ConsoleProxyHttpHandlerHelper {
                 if(param.getTicket() != null)
                     map.put("ticket", param.getTicket());
             }
+        } else {
+        	// we no longer accept information from parameter other than token 
+        	map.clear();
         }
         
         return map;


Mime
View raw message