mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-09 00:30:28 +00:00
fix: prevent masking gaps in workflow command logs (#1384)
Mask partially escaped workflow command output and complete one-character values while preserving literal output and stream line endings. Fixes: https://gitea.com/gitea/runner/issues/300 Reviewed-on: https://gitea.com/gitea/runner/pulls/1384 Reviewed-by: bircni <[email protected]>
This commit is contained in:
1 parent
ee03687688
commit
95ef17d022
6 files changed
+123
-20
No files matched your search
@@ -193,6 +193,11 @@ func TestCommandLogWriter(t *testing.T) {
|
||||
log []string
|
||||
masks []string
|
||||
}{
|
||||
{
|
||||
name: "mask commands decode modern and legacy escapes once",
|
||||
steps: [][]string{{"::add-mask::%25", "##[add-mask]alpha beta%3Bgamma%5Ddelta%250A"}},
|
||||
masks: []string{"%", "alpha beta;gamma]delta%0A"},
|
||||
},
|
||||
{
|
||||
name: "applied commands are hidden unless echoed",
|
||||
steps: [][]string{{
|
||||
|
||||
Reference in new issue
Block a user