Skip to content

Commit

Permalink
use octal rather than literals for control characters in R string
Browse files Browse the repository at this point in the history
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; see emacs-ess#1163
  • Loading branch information
dankessler committed Jan 31, 2022
1 parent c59d8c1 commit 6238ea8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion etc/ESSR/R/mpi.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
else as.character(el)
})
payload <- paste(dots, collapse = "")
cat(sprintf("_%s%s\\", head, payload))
cat(sprintf("\033_%s036%s\033\\", head, payload))
}

.ess_mpi_message <- function(msg){
Expand Down

0 comments on commit 6238ea8

Please sign in to comment.