From b39fcbed73a1907c1d26d3ce9233d677afc75367 Mon Sep 17 00:00:00 2001 From: DarthArgus Date: Sun, 1 Jan 2017 02:40:16 -0600 Subject: [PATCH] probably helps if we actually set this --- .../src/shared/ClientConnection.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/engine/server/application/ConnectionServer/src/shared/ClientConnection.cpp b/engine/server/application/ConnectionServer/src/shared/ClientConnection.cpp index 983fc0f7..75098f35 100755 --- a/engine/server/application/ConnectionServer/src/shared/ClientConnection.cpp +++ b/engine/server/application/ConnectionServer/src/shared/ClientConnection.cpp @@ -283,17 +283,20 @@ void ClientConnection::handleClientIdMessage(const ClientIdMsg &msg) { Archive::ByteStream t(msg.getToken(), msg.getTokenSize()); Archive::ReadIterator ri(t); KeyShare::Token token(ri); + char sessionId[apiSessionIdWidth]; - result = ConnectionServer::decryptToken(token, m_suid, m_isSecure, m_accountName); + if (!ConfigConnectionServer::getValidateStationKey()) { + // get SUID from token + result = ConnectionServer::decryptToken(token, m_suid, m_isSecure, m_accountName); + } else { + result = ConnectionServer::decryptToken(token, sessionId, m_requestedSuid); + } - StationId apiSuid = 0; static const std::string sessURL(ConfigConnectionServer::getSessionURL()); - if (result) { if (ConfigConnectionServer::getValidateStationKey() && !sessURL.empty()) { bool cont = false; - - printf("\nAttempting to test our session...\n"); + StationId apiSuid = 0; webAPI api(sessURL); std::string clientIP = getRemoteAddress();