mirror of
https://github.com/actions/runner.git
synced 2025-12-10 12:36:23 +00:00
handle secret ending with &+
This commit is contained in:
@@ -98,7 +98,17 @@ namespace GitHub.DistributedTask.Logging
|
|||||||
var secretSection = string.Empty;
|
var secretSection = string.Empty;
|
||||||
if (value.Contains("&+"))
|
if (value.Contains("&+"))
|
||||||
{
|
{
|
||||||
secretSection = value.Substring(0, value.IndexOf("&+") + "&+".Length);
|
int endIndex = value.IndexOf("&+") + "&+".Length;
|
||||||
|
|
||||||
|
// If string ends with "&+", grab the whole string
|
||||||
|
if (endIndex == value.Length)
|
||||||
|
{
|
||||||
|
secretSection = value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
secretSection = value.Substring(0, endIndex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user