-
Notifications
You must be signed in to change notification settings - Fork 8k
ext/posix: validate mode argument in posix_access #21104
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
base: master
Are you sure you want to change the base?
Conversation
| echo "File exists OK\n"; | ||
| } | ||
|
|
||
| unlink($testfile); |
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.
usually more appropriate to put such operations in a CLEAN section.
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.
also $testfile is very probably undefined at this stage.
| unlink($testfile); | ||
| $dir = __DIR__; | ||
| $testfile = "$dir/testfile.txt"; | ||
| if (file_exists($testfile)) { |
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.
you can probably simplify with just @unlink($testfile);
note: no need to rush committing after every comment ;) kind of burden the CI.
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.
Sorry
Add proper validation for the
flagargument inposix_access().