Correct key type.
authorgilbert <gilbert@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 30 Mar 2005 16:22:56 +0000 (16:22 +0000)
committergilbert <gilbert@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 30 Mar 2005 16:22:56 +0000 (16:22 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1352 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/serviceprovider/SessionManager.java

index 7036016..bc0ad76 100644 (file)
@@ -71,14 +71,16 @@ public class SessionManager {
        public String generateKey() {
            byte[] trash = new byte[16];
            char[] ctrash = new char[16];
+               String key;
            do {
                rand.nextBytes(trash);
                for (int i=0;i<16;i++) {
                    trash[i]&=0x3f;
                    ctrash[i]=(char)table.charAt(trash[i]);
                }
-           } while (null!=sessions.get(ctrash));
-           return new String(ctrash);
+                       key=new String(ctrash);
+           } while (null!=sessions.get(key));
+           return key;
        }