mirror of
https://github.com/actions/runner.git
synced 2026-02-09 06:41:59 +08:00
Compare commits
1 Commits
fhammerl/2
...
users/eric
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa07c78c0c |
@@ -84,6 +84,7 @@ namespace GitHub.Runner.Common
|
||||
this.SecretMasker.AddValueEncoder(ValueEncoders.Base64StringEscape);
|
||||
this.SecretMasker.AddValueEncoder(ValueEncoders.Base64StringEscapeShift1);
|
||||
this.SecretMasker.AddValueEncoder(ValueEncoders.Base64StringEscapeShift2);
|
||||
this.SecretMasker.AddValueEncoder(ValueEncoders.BashComparand);
|
||||
this.SecretMasker.AddValueEncoder(ValueEncoders.CommandLineArgumentEscape);
|
||||
this.SecretMasker.AddValueEncoder(ValueEncoders.ExpressionStringEscape);
|
||||
this.SecretMasker.AddValueEncoder(ValueEncoders.JsonStringEscape);
|
||||
|
||||
@@ -38,6 +38,20 @@ namespace GitHub.DistributedTask.Logging
|
||||
return Base64StringEscapeShift(value, 2);
|
||||
}
|
||||
|
||||
public static String BashComparand(String value)
|
||||
{
|
||||
var result = new StringBuilder();
|
||||
foreach (var c in value)
|
||||
{
|
||||
if (!char.IsLowSurrogate(c))
|
||||
{
|
||||
result.Append('\\');
|
||||
}
|
||||
result.Append(c);
|
||||
}
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
// Used when we pass environment variables to docker to escape " with \"
|
||||
public static String CommandLineArgumentEscape(String value)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user