diff options
author | Simon Rettberg | 2014-10-16 15:49:01 +0200 |
---|---|---|
committer | Simon Rettberg | 2014-10-16 15:49:01 +0200 |
commit | aa7fe17264deba056745e4da6e5f476b11a71cab (patch) | |
tree | c3371aad97fbb6f0123dd217468de39d3c061739 /src | |
parent | Implement suffixList for getOrganizations, added stub for updateSatelliteAddress (diff) | |
download | masterserver-aa7fe17264deba056745e4da6e5f476b11a71cab.tar.gz masterserver-aa7fe17264deba056745e4da6e5f476b11a71cab.tar.xz masterserver-aa7fe17264deba056745e4da6e5f476b11a71cab.zip |
d'oh... Fix getSessionFrom(Token|SessionId)
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/openslx/imagemaster/session/SessionManager.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/org/openslx/imagemaster/session/SessionManager.java b/src/main/java/org/openslx/imagemaster/session/SessionManager.java index e468278..7dcb754 100644 --- a/src/main/java/org/openslx/imagemaster/session/SessionManager.java +++ b/src/main/java/org/openslx/imagemaster/session/SessionManager.java @@ -35,8 +35,10 @@ public class SessionManager public static Session getSessionFromToken( String token ) { - if ( token == null || token.length() != 64 ) + if ( token == null || token.length() != 32 ) { + log.debug("invalid token format: " + token); return null; + } final Session session; synchronized ( sessions ) { session = sessions.get( token ); @@ -75,8 +77,10 @@ public class SessionManager public static Object getSessionFromSessionId( String sessionId ) { - if ( sessionId == null || sessionId.length() != 32 ) + if ( sessionId == null || sessionId.length() != 64 ) { + log.debug("invalid sessionid format: " + sessionId); return null; + } final Session session; synchronized ( sessions ) { session = sessions.get( sessionId ); |