From 58a16ef66edf07a692c68ee9a93aa0ba58ad592d Mon Sep 17 00:00:00 2001 From: spx Date: Fri, 9 Sep 2011 17:15:02 +0000 Subject: [PATCH] Fixed that !WriteKeyValue fails if filepath includes ".." like "skin..ini". --- Library/Measure.cpp | 2 +- Library/Rainmeter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Measure.cpp b/Library/Measure.cpp index a9971fd6..86e65313 100644 --- a/Library/Measure.cpp +++ b/Library/Measure.cpp @@ -851,5 +851,5 @@ CMeasure* CMeasure::Create(const WCHAR* measure, CMeterWindow* meterWindow, cons */ void CMeasure::ExecuteBang(const WCHAR* args) { - LogWithArgs(LOG_WARNING, L"!CommandMeasure: Not suppoted by [%s]", m_Name.c_str()); + LogWithArgs(LOG_WARNING, L"!CommandMeasure: Not supported by [%s]", m_Name.c_str()); } diff --git a/Library/Rainmeter.cpp b/Library/Rainmeter.cpp index 95154df7..8f698aa6 100644 --- a/Library/Rainmeter.cpp +++ b/Library/Rainmeter.cpp @@ -1557,7 +1557,7 @@ void RainmeterWriteKeyValueWide(const WCHAR* arg) { const std::wstring& iniFile = subStrings[3]; - if (iniFile.find(L"..") != std::string::npos) + if (iniFile.find(L"..\\") != std::string::npos || iniFile.find(L"../") != std::string::npos) { LogWithArgs(LOG_ERROR, L"!WriteKeyValue: Illegal path: %s", iniFile.c_str()); return;