summaryrefslogtreecommitdiff
path: root/src/net/manaserv
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-08 20:41:48 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-08 21:37:14 +0300
commit72d496fb243f622c9a582d593b0d51ec057acd37 (patch)
tree0032d56a00470b9974bedaa971c2dd2401fec159 /src/net/manaserv
parentefe6e235c05c7ae37e0608f69cada7db38501355 (diff)
downloadmanaverse-72d496fb243f622c9a582d593b0d51ec057acd37.tar.gz
manaverse-72d496fb243f622c9a582d593b0d51ec057acd37.tar.bz2
manaverse-72d496fb243f622c9a582d593b0d51ec057acd37.tar.xz
manaverse-72d496fb243f622c9a582d593b0d51ec057acd37.zip
Validate update host.
Diffstat (limited to 'src/net/manaserv')
-rw-r--r--src/net/manaserv/loginhandler.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/net/manaserv/loginhandler.cpp b/src/net/manaserv/loginhandler.cpp
index f1cb8e352..8b8ac831f 100644
--- a/src/net/manaserv/loginhandler.cpp
+++ b/src/net/manaserv/loginhandler.cpp
@@ -341,9 +341,18 @@ void LoginHandler::readServerInfo(Net::MessageIn &msg)
// Set the update host when included in the message
const std::string updateHost = msg.readString();
if (!updateHost.empty())
+ {
+ if (!checkPath(updateHost))
+ {
+ logger->log1("Warning: incorrect update server name");
+ updateHost = "";
+ }
mLoginData->updateHost = updateHost;
+ }
else
+ {
logger->log1("Warning: server does not have an update host set!");
+ }
// Read the client data folder for dynamic data loading.
// This is only used by the QT client.