prepend opts.dir || tmpDir to template if no path is given#144
Merged
silkentrance merged 1 commit intomasterfrom Nov 27, 2017
Merged
prepend opts.dir || tmpDir to template if no path is given#144silkentrance merged 1 commit intomasterfrom
silkentrance merged 1 commit intomasterfrom
Conversation
raszi
reviewed
Nov 28, 2017
|
|
||
| Creates a new temporary directory with mode `0700` and filename like `/tmp/tmp-nk2J1u`. | ||
|
|
||
| IMPORTANT NOTE: template no longer accepts a path. Use the dir option instead if you |
Owner
There was a problem hiding this comment.
This does not apply because we still support full paths.
| return opts.template.replace(TEMPLATE_PATTERN, _randomChars(6)); | ||
| var template = opts.template; | ||
| // make sure that we prepend the tmp path if none was given | ||
| if (path.basename(template) == template) |
Owner
There was a problem hiding this comment.
This will be still a breaking change, but since this is still a beta software and most probably nobody used the template option as it is without a full path, therefore I am okay with the change.
Collaborator
Author
There was a problem hiding this comment.
@raszi Yes, this is somewhat breaking. And there may still exist security concerns for templates that resemble paths...
This was referenced Mar 14, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fix #143