Skip to content

Commit 2ce1846

Browse files
committed
use octal rather than literals for control characters in R string
This avoids a bug when the file is "injected" where the control characters are potentially intercepted and consumed by the shell on their way to R. This should fix the original bug reported in #1163, although it doesn't fully address the issues with MPI support for sessions initiated by `ess-remote` (which require some additional work as outlined [here](#1163 (comment))
1 parent c59d8c1 commit 2ce1846

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

etc/ESSR/R/mpi.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
else as.character(el)
88
})
99
payload <- paste(dots, collapse = "")
10-
cat(sprintf("_%s%s\\", head, payload))
10+
cat(sprintf("\033_%s036%s\033\\", head, payload))
1111
}
1212

1313
.ess_mpi_message <- function(msg){

0 commit comments

Comments
 (0)