Skip to content

Commit

Permalink
πŸ› allow multipage views to create path sections with dots.
Browse files Browse the repository at this point in the history
This could sometimes be used when one would use the variable to output a file rather than a directory.

One should still not be able to break out because of / being sanitized.
  • Loading branch information
Abbe98 committed Mar 20, 2022
1 parent 6bb4475 commit 43ccc42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func CountFilesRecursive(dir string) (int, error) {
return count, nil
}

var illegalPath = regexp.MustCompile(`[\~\.\/\:\*\?\"\<\>\|]`)
var illegalPath = regexp.MustCompile(`[\~\/\:\*\?\"\<\>\|]`)

func SanitizePathSection(path string) string {
return illegalPath.ReplaceAllString(path, "_")
Expand Down

0 comments on commit 43ccc42

Please sign in to comment.