From 23d910c53db763380e0a199ebc9d9455c5ef56e3 Mon Sep 17 00:00:00 2001 From: DarthArgus Date: Sat, 18 Jun 2016 22:24:31 +0000 Subject: [PATCH] i realize this adds another one time-ish use var, but i'm more comfortable if we trim stuff on both this and the receiving end --- .../application/LoginServer/src/shared/ClientConnection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/server/application/LoginServer/src/shared/ClientConnection.cpp b/engine/server/application/LoginServer/src/shared/ClientConnection.cpp index 8ec8b511..eb79d2ce 100755 --- a/engine/server/application/LoginServer/src/shared/ClientConnection.cpp +++ b/engine/server/application/LoginServer/src/shared/ClientConnection.cpp @@ -175,6 +175,7 @@ void ClientConnection::validateClient(const std::string & id, const std::string // to avoid having to re-type this stupid var all over the place // ideally we wouldn't copy this here, but it would be a huge pain const std::string trimmedId = trim(id); + const std::string trimmedKey = trim(key); // and to avoid funny business with atoi and casing // make it a separate var than the one we send the auth server @@ -199,7 +200,7 @@ void ClientConnection::validateClient(const std::string & id, const std::string if (!authURL.empty()) { std::ostringstream postBuf; - postBuf << "user_name=" << trimmedId << "&user_password=" << key << "&stationID=" << suid << "&ip=" << getRemoteAddress(); + postBuf << "user_name=" << trimmedId << "&user_password=" << trimmedKey << "&stationID=" << suid << "&ip=" << getRemoteAddress(); std::string response = webAPI::simplePost(authURL, std::string(postBuf.str()), "");