]> source.dussan.org Git - vaadin-framework.git/commitdiff
Changed seckey o that it does not use UUID, to be consistent with 5.2 that requires...
authorMarc Englund <marc.englund@itmill.com>
Thu, 18 Dec 2008 12:28:18 +0000 (12:28 +0000)
committerMarc Englund <marc.englund@itmill.com>
Thu, 18 Dec 2008 12:28:18 +0000 (12:28 +0000)
svn changeset:6270/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/server/CommunicationManager.java

index 270ea42cc7caed8cff813ee6197210bef83495c9..fcdd96dcd9301e757a025a1ea535785e1ded55fa 100644 (file)
@@ -31,7 +31,6 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
-import java.util.UUID;
 
 import javax.servlet.ServletException;
 import javax.servlet.ServletInputStream;
@@ -625,10 +624,10 @@ public class CommunicationManager implements Paintable.RepaintRequestListener {
                     .getProperty("disable-xsrf-protection"));
             if (bursts.length == 1 && "init".equals(bursts[0])) {
                 // initial request, no variable changes: send key
-                String uuid = (String) request.getSession().getAttribute(
+                String seckey = (String) request.getSession().getAttribute(
                         ApplicationConnection.UIDL_SECURITY_HEADER);
-                if (uuid == null) {
-                    uuid = UUID.randomUUID().toString();
+                if (seckey == null) {
+                    seckey = "" + (int) (Math.random() * 1000000);
                 }
                 /*
                  * Cookie c = new Cookie(
@@ -636,9 +635,9 @@ public class CommunicationManager implements Paintable.RepaintRequestListener {
                  * response.addCookie(c);
                  */
                 response.setHeader(ApplicationConnection.UIDL_SECURITY_HEADER,
-                        uuid);
+                        seckey);
                 request.getSession().setAttribute(
-                        ApplicationConnection.UIDL_SECURITY_HEADER, uuid);
+                        ApplicationConnection.UIDL_SECURITY_HEADER, seckey);
                 return true;
             } else if (!nocheck) {
                 // check the key