New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove insecure mktemp usage #4262
Conversation
| os.unlink(tmpname) | ||
| with NamedTemporaryFile() as tmp: | ||
| fp = memmap(tmp.name, dtype=self.dtype, mode='w+', | ||
| shape=self.shape) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP8 indent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
LGTM modulo comments. |
mktemp only returns a filename, a malicous user could replace it before it gets used.
|
Merged, thanks. |
|
The change in Result with Python 3.3: You need to use |
|
weird why did I open the file in my patch in the first place, fix in #4271 |
mktemp only returns a filename, a malicous user could replace it before
it gets used.