kitty/kittens/ssh
Connor Welsh d50d1bba65
ssh kitten: avoid in-place mutation of cmd by slices.Insert
slices.Insert(cmd, 1, "-O", "check") writes into cmd's backing array
when there is spare capacity (cap(cmd) >= len(cmd)+2). check_cmd points
at the shifted array, but cmd's slice header is unchanged: reading
cmd[:insertion_point] later returns "-O", "check", ... where the
original prefix used to be. run_control_master, forward_remote_control,
and the final ssh exec all build their argvs from this corrupted prefix.

Repro: share_connections=yes, forward_remote_control=yes, and enough
ssh_args to push cmd past Go's slice-growth threshold (kitten ssh -v
host does it). With the ControlMaster already up you'll see
"Multiplexing command already specified"; otherwise it fails with
"Failed to start SSH ControlMaster" and a stray -O check left in the
cmdline.
2026-05-18 23:08:33 -04:00
..
__init__.py
askpass.go Switch to external shm package 2025-11-10 12:01:05 +05:30
config.go ssh kitten: Fix a bug where automatic login was not working 2025-11-05 19:35:36 +05:30
config_test.go Rename go module from kitty -> github.com/kovidgoyal/kitty 2025-05-16 08:43:39 +05:30
main.go ssh kitten: avoid in-place mutation of cmd by slices.Insert 2026-05-18 23:08:33 -04:00
main.py Cleanup previous PR 2025-09-30 20:38:44 +05:30
main_test.go Switch to external shm package 2025-11-10 12:01:05 +05:30
utils.go ssh kitten: Fix -o RemoteCommand handling 2026-04-15 05:19:22 +05:30
utils.py Sanitize ssh kitten shm open error message when sending over tty 2026-04-24 17:25:00 +05:30
utils_test.go Rename go module from kitty -> github.com/kovidgoyal/kitty 2025-05-16 08:43:39 +05:30