mirror of
https://github.com/actions/runner.git
synced 2025-12-12 05:37:01 +00:00
Fix ArgumentOutOfRangeException in PowerShellPostAmpersandEscape. (#2875)
This commit is contained in:
@@ -123,8 +123,11 @@ namespace GitHub.DistributedTask.Logging
|
||||
var secretSection = string.Empty;
|
||||
if (value.Contains("&+"))
|
||||
{
|
||||
// +1 to skip the letter that got colored
|
||||
secretSection = value.Substring(value.IndexOf("&+") + "&+".Length + 1);
|
||||
if (value.Length > value.IndexOf("&+") + "&+".Length + 1)
|
||||
{
|
||||
// +1 to skip the letter that got colored
|
||||
secretSection = value.Substring(value.IndexOf("&+") + "&+".Length + 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user