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

Question: Shouldn't check for potential file inclusion via variable for os.Create? #760

Closed
vaiojarsad opened this issue Jan 12, 2022 · 2 comments · Fixed by #761
Closed

Comments

@vaiojarsad
Copy link

I got complaints about the potential unsafe use of os.Open and ioutil.ReadFile and I was wondering why I didn't get any about os.Create.

The program that I was working on was a really trivial tool, only for internal use (so, no real risk) but in all cases (os.Open, ioutil.ReadFile and os.Create) the provided variable to these functions could have been manipulated by a malicious user.

@ccojocar
Copy link
Member

This function call seems to be missing form the list. I added it. Thanks for pointing this out.

@vaiojarsad
Copy link
Author

Anytime, my pleasure!

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 a pull request may close this issue.

2 participants