Skip to content
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

Use securely generated random temporary file names #539

Merged
merged 1 commit into from
Nov 21, 2020
Merged

Conversation

piksel
Copy link
Member

@piksel piksel commented Nov 10, 2020

  • Use GetRandomFileName() instead of GetTempFileName()
  • Rename WindowsPathUtils to PathUtils and make a proper static class
  • Unify random file name creation into PathUtils
  • Do not create new random files before use

Fixes #537

I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License.

- Use GetRandomFileName() instead of  GetTempFileName()
- Unify random file name creation into PathUtils
- Do not create new random files before use
- Rename  WindowsPathUtils to PathUtils and make a proper static class
HowToDoThis added a commit to HowToDoThis/SharpZipLib that referenced this pull request Nov 21, 2020
@piksel piksel merged commit 134b8f4 into master Nov 21, 2020
@piksel piksel deleted the fix/cwe-377 branch November 21, 2020 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid Path.GetTempFileName() due to CWE 377.
1 participant