Describe the bug
This change released with LogMonitor 2.2.0
|
// Reject paths with traversal sequences or absolute path indicators |
|
if (userConfigName.find(L"..") != std::wstring::npos || |
|
userConfigName.find(L'/') != std::wstring::npos || |
|
userConfigName.find(L'\\') != std::wstring::npos || |
|
userConfigName.find(L':') != std::wstring::npos) |
|
{ |
|
logWriter.TraceError(L"Invalid configuration file name."); |
|
return 0; |
|
} |
no longer allows passing the config file via absolute path: C:\LogMonitor.exe /Config C:\LogMonitorConfig.json
To Reproduce
Steps to reproduce the behavior:
- Run
C:\LogMonitor.exe /Config C:\LogMonitorConfig.json
- See error
[LOGMONITOR] ERROR: Invalid configuration file name.
Expected behavior
C:\LogMonitor.exe /Config C:\LogMonitorConfig.json should run fine as it has for long time using previous versions
Screenshots
n/a
Configuration
-Tool: LogMonitor
-Version: 2.2.0
Additional context
n/a
Describe the bug
This change released with LogMonitor 2.2.0
windows-container-tools/LogMonitor/src/LogMonitor/Main.cpp
Lines 381 to 389 in b784aac
no longer allows passing the config file via absolute path:
C:\LogMonitor.exe /Config C:\LogMonitorConfig.jsonTo Reproduce
Steps to reproduce the behavior:
C:\LogMonitor.exe /Config C:\LogMonitorConfig.json[LOGMONITOR] ERROR: Invalid configuration file name.Expected behavior
C:\LogMonitor.exe /Config C:\LogMonitorConfig.jsonshould run fine as it has for long time using previous versionsScreenshots
n/a
Configuration
-Tool: LogMonitor
-Version: 2.2.0
Additional context
n/a