Skip to content

Commit

Permalink
🔠 No case conversion for SIP003 environment variables
Browse files Browse the repository at this point in the history
- Corrects the mistake in 127cb96 and fixes #3013
  • Loading branch information
database64128 committed Nov 5, 2020
1 parent fdb7a5e commit b2dd2d9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions shadowsocks-csharp/Controller/Service/Sip003Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,12 @@ public bool StartIfNeeded()

public string ExpandEnvironmentVariables(string name, StringDictionary environmentVariables = null)
{
name = name.ToLower();
// Expand the environment variables from the new process itself
if (environmentVariables != null)
{
foreach(string key in environmentVariables.Keys)
{
name = name.Replace($"%{key.ToLower()}%", environmentVariables[key]);
name = name.Replace($"%{key}%", environmentVariables[key]);
}
}
// Also expand the environment variables from current main process (system)
Expand Down

0 comments on commit b2dd2d9

Please sign in to comment.