Merge remote-tracking branch 'origin/topic/robin/gh-54-sanitize'

* origin/topic/robin/gh-54-sanitize:
  Sanitize log files names before they go into system().
This commit is contained in:
Tim Wojtulewicz 2021-09-21 15:16:49 -07:00
parent a49dcc8954
commit 0a0ed65306
8 changed files with 52 additions and 7 deletions

View file

@ -24,7 +24,7 @@ event TrimTraceFile::go(first_trim: bool)
{
local info = rotate_file_by_name(trace_output_file);
if ( info$old_name != "" )
system(fmt("/bin/rm %s", info$new_name));
system(fmt("/bin/rm %s", safe_shell_quote(info$new_name)));
}
schedule trim_interval { TrimTraceFile::go(F) };