Skip to content

Commit

Permalink
fix(plugins/rtf-to-html): restrict temp file permissions (#1339)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Mar 21, 2023
1 parent 1b14dc7 commit fa32bbc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/rtf-to-html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ async function plugin(server, options) {
rtf: tempFile,
id,
};
await fs.writeFile(tempFile, req.body);
// 0600 permissions (read/write for owner only)
await fs.writeFile(tempFile, req.body, { mode: 0o600 });

try {
// Add title to document
Expand Down

0 comments on commit fa32bbc

Please sign in to comment.