From 72d496fb243f622c9a582d593b0d51ec057acd37 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 8 Jan 2012 20:41:48 +0300 Subject: Validate update host. --- src/net/ea/loginhandler.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/net/ea/loginhandler.cpp') diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp index bbf19fb34..291a92906 100644 --- a/src/net/ea/loginhandler.cpp +++ b/src/net/ea/loginhandler.cpp @@ -150,6 +150,11 @@ void LoginHandler::processUpdateHost(Net::MessageIn &msg) len = msg.readInt16() - 4; mUpdateHost = msg.readString(len); + if (!checkPath(mUpdateHost)) + { + mUpdateHost = ""; + logger->log1("Warning: incorrect update server name"); + } loginData.updateHost = mUpdateHost; logger->log("Received update host \"%s\" from login server.", -- cgit v1.2.3-70-g09d2