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

Work with the file without restriction of rights #439

Open
ihsinme opened this issue Dec 3, 2021 · 1 comment
Open

Work with the file without restriction of rights #439

ihsinme opened this issue Dec 3, 2021 · 1 comment

Comments

@ihsinme
Copy link
Contributor

ihsinme commented Dec 3, 2021

I may be wrong, but I see in your code working with a file without setting permissions. this can lead to a security problem. both by the vector of confidentiality (access to information) and by the vector of accessibility (for example, when using links).
I suggest considering setting limits using umask (0022); and chmod (..., 0644);

FILE *outputFile = fopen(fileName, "wb");

FILE* outputFile = fopen(fileName, "wb");

@dvorka
Copy link
Owner

dvorka commented Dec 3, 2021

@ihsinme you are right! Thank you for reporting this security 🐞!

@dvorka dvorka changed the title work with the file without restriction of rights. Work with the file without restriction of rights. Dec 10, 2021
@dvorka dvorka pinned this issue Dec 10, 2021
@dvorka dvorka changed the title Work with the file without restriction of rights. Work with the file without restriction of rights Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants