mirror of
https://github.com/edubart/otclient.git
synced 2025-12-18 14:47:11 +01:00
Fix a vulnerability in password encryption
* There was an error in the encryption used to save passwords, now it's really harder to decrypt the password from the config file * Other minor changes
This commit is contained in:
@@ -68,7 +68,7 @@ bool ResourceManager::discoverWorkDir(const std::string& existentFile)
|
||||
|
||||
bool ResourceManager::setupUserWriteDir(const std::string& appWriteDirName)
|
||||
{
|
||||
std::string userDir = PHYSFS_getUserDir();
|
||||
std::string userDir = getUserDir();
|
||||
std::string dirName;
|
||||
#ifndef WIN32
|
||||
dirName = stdext::format(".%s", appWriteDirName);
|
||||
@@ -306,6 +306,11 @@ std::string ResourceManager::getBaseDir()
|
||||
return PHYSFS_getBaseDir();
|
||||
}
|
||||
|
||||
std::string ResourceManager::getUserDir()
|
||||
{
|
||||
return PHYSFS_getUserDir();
|
||||
}
|
||||
|
||||
std::string ResourceManager::guessFileType(const std::string& filename, const std::string& type)
|
||||
{
|
||||
if(g_resources.fileExists(filename))
|
||||
|
||||
@@ -66,6 +66,7 @@ public:
|
||||
std::string getRealDir(const std::string& path);
|
||||
std::string getCurrentDir();
|
||||
std::string getBaseDir();
|
||||
std::string getUserDir();
|
||||
std::string getWriteDir() { return m_writeDir; }
|
||||
std::string getWorkDir() { return m_workDir; }
|
||||
std::deque<std::string> getSearchPaths() { return m_searchPaths; }
|
||||
|
||||
Reference in New Issue
Block a user