- commit
- 91b5f0a
- parent
- 1acc4d5
- author
- Eric Bower
- date
- 2026-02-24 20:46:40 -0500 EST
fix(pssh): strip quotes after splitting on them
2 files changed,
+2,
-2
+1,
-1
1@@ -537,7 +537,7 @@ func NewSSHServer(ctx context.Context, logger *slog.Logger, config *SSHServerCon
2 splitter.SingleQuotes,
3 )
4 command = payload.Value
5- cmdSlice, _ := commaSplitter.Split(command)
6+ cmdSlice, _ := commaSplitter.Split(command, splitter.StripQuotes)
7 sesh.SetValue("command", cmdSlice)
8 }
9
+1,
-1
1@@ -329,7 +329,7 @@ func TestSSHServerCommandParsing(t *testing.T) {
2
3 time.Sleep(100 * time.Millisecond)
4
5- expectedCommand := []string{"accept", "--comment", "'here we go'", "101"}
6+ expectedCommand := []string{"accept", "--comment", "here we go", "101"}
7 if !slices.Equal(expectedCommand, capturedCommand) {
8 t.Error("command not exected", capturedCommand, len(capturedCommand), expectedCommand, len(expectedCommand))
9 }