Skip to content

Commit

Permalink
fix: tighten up the character set that will be removed (#93)
Browse files Browse the repository at this point in the history
the original implementation was wrong, the documented disallowed characters are 0-31 not \x00-\x31
  • Loading branch information
nlf committed Jul 11, 2022
1 parent 6493397 commit d510209
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/escape.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const sh = (input) => {
// disabling the no-control-regex rule for this line as we very specifically _do_ want to
// replace those characters if they somehow exist at this point, which is highly unlikely
// eslint-disable-next-line no-control-regex
const filename = (input) => input.replace(/[<>:"/\\|?*\x00-\x31]/g, '')
const filename = (input) => input.replace(/[<>:"/\\|?*\x00-\x1F]/g, '')

module.exports = {
cmd,
Expand Down

0 comments on commit d510209

Please sign in to comment.