Fix security hole in #50, plus minor code improvements #51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I took a look at #50 and implemented a fix. I can't think of any legitimate reasons why you'd want to allow
..
in partial names, but just in case I've implemented a booleanUnsafe
mode flag inFileProvider
to enable that behavior, with the default being to enforce safety.I also cleaned up the code a little so it only opens the partial file once, removed some redundant type declarations IDEA found, decapitalized an error message, and removed use of " " as a directory to search by default.