Merge pull request #173 from oleg-nenashev/bug/Issue_54_EnvVars_IN_EventLog

Fixes #54. Do not dump WinSW environment variables to the Event log
pull/177/head
Oleg Nenashev 2016-12-27 17:16:59 +01:00 committed by GitHub
commit 098046c8e1
1 changed files with 4 additions and 1 deletions

View File

@ -210,10 +210,13 @@ namespace winsw
protected override void OnStart(string[] _) protected override void OnStart(string[] _)
{ {
_envs = _descriptor.EnvironmentVariables; _envs = _descriptor.EnvironmentVariables;
// TODO: Disabled according to security concerns in https://github.com/kohsuke/winsw/issues/54
// Could be restored, but unlikely it's required in event logs at all
/**
foreach (string key in _envs.Keys) foreach (string key in _envs.Keys)
{ {
LogEvent("envar " + key + '=' + _envs[key]); LogEvent("envar " + key + '=' + _envs[key]);
} }*/
HandleFileCopies(); HandleFileCopies();