Files
Kaxil Naik e1d881b5c4 Fix SSHRemoteJobOperator mangling environment values with spaces or shell characters (#74810)
* Fix SSHRemoteJobOperator mangling environment values with spaces or shell characters

On POSIX hosts each environment value was escaped for one level of single
quotes, but the export lines are spliced into the single-quoted job_script
literal, so the value's opening quote closed that literal. A value with a
space broke the wrapper, and $(...), backticks or ; in a value were run by
the wrapper shell instead of reaching the job.

Quote each value with shlex.quote, then escape the export block for the
job_script literal the same way the command already is.

* Document that SSHRemoteJobOperator passes environment values literally

Values used to be expanded by the remote shell as a side effect of the quoting bug, so $VAR in a value no longer works. Say so in the docstring and the operator docs, escape the exports and command in one step, and cover backslashes and braced variables in the test.
2026-10-16 00:13:50 +01:00
..