diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-01-08 20:41:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-01-08 21:37:14 +0300 |
commit | 72d496fb243f622c9a582d593b0d51ec057acd37 (patch) | |
tree | 0032d56a00470b9974bedaa971c2dd2401fec159 /src/client.cpp | |
parent | efe6e235c05c7ae37e0608f69cada7db38501355 (diff) | |
download | mv-72d496fb243f622c9a582d593b0d51ec057acd37.tar.gz mv-72d496fb243f622c9a582d593b0d51ec057acd37.tar.bz2 mv-72d496fb243f622c9a582d593b0d51ec057acd37.tar.xz mv-72d496fb243f622c9a582d593b0d51ec057acd37.zip |
Validate update host.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 4 |
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) |