summaryrefslogtreecommitdiff
path: root/src/client.cpp
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/client.cpp
parentefe6e235c05c7ae37e0608f69cada7db38501355 (diff)
downloadmanaverse-72d496fb243f622c9a582d593b0d51ec057acd37.tar.gz
manaverse-72d496fb243f622c9a582d593b0d51ec057acd37.tar.bz2
manaverse-72d496fb243f622c9a582d593b0d51ec057acd37.tar.xz
manaverse-72d496fb243f622c9a582d593b0d51ec057acd37.zip
Validate update host.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 5d5ce3535..88fe8c443 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1689,6 +1689,8 @@ void Client::initConfiguration()
config.setValue("musicVolume", 60);
config.setValue("fpslimit", 60);
std::string defaultUpdateHost = branding.getValue("defaultUpdateHost", "");
+ if (!checkPath(defaultUpdateHost))
+ defaultUpdateHost = "";
config.setValue("updatehost", defaultUpdateHost);
config.setValue("customcursor", true);
config.setValue("useScreenshotDirectorySuffix", true);
@@ -1741,6 +1743,8 @@ void Client::initUpdatesDir()
// If updatesHost is currently empty, fill it from config file
if (mUpdateHost.empty())
mUpdateHost = config.getStringValue("updatehost");
+ if (!checkPath(mUpdateHost))
+ return;
// Don't go out of range int he next check
if (mUpdateHost.length() < 2)