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

@ -66,7 +66,7 @@ function scp_postprocessor(info: Log::RotationInfo): bool
command += fmt("scp %s %s@%s:%s;", info$fname, d$user, d$host, dst);
}
command += fmt("/bin/rm %s", info$fname);
command += fmt("/bin/rm %s", safe_shell_quote(info$fname));
system(command);
return T;
}

View file

@ -69,7 +69,7 @@ function sftp_postprocessor(info: Log::RotationInfo): bool
d$host_port, d$user, d$host);
}
command += fmt("/bin/rm %s", info$fname);
command += fmt("/bin/rm %s", safe_shell_quote(info$fname));
system(command);
return T;
}