Skip to content

ext/posix: validate mode argument in posix_access#21104

Closed
arshidkv12 wants to merge 8 commits intophp:masterfrom
arshidkv12:posix_access
Closed

ext/posix: validate mode argument in posix_access#21104
arshidkv12 wants to merge 8 commits intophp:masterfrom
arshidkv12:posix_access

Conversation

@arshidkv12
Copy link
Contributor

Add proper validation for the flag argument in posix_access().

unlink($testfile);
$dir = __DIR__;
$testfile = "$dir/testfile.txt";
if (file_exists($testfile)) {
Copy link
Member

@devnexen devnexen Feb 1, 2026

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry

Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM minus my last remark

@arshidkv12
Copy link
Contributor Author

Would you be able to merge it?

@devnexen
Copy link
Member

devnexen commented Feb 5, 2026

minus my last remark

meaning you did not address my very last comment

@arshidkv12
Copy link
Contributor Author

Sorry

?>
--CLEAN--
<?php
unlink(__DIR__ . '/testfile.txt');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: @unlink...

@devnexen devnexen closed this in fdaa488 Feb 6, 2026
@devnexen
Copy link
Member

devnexen commented Feb 6, 2026

Thanks !

@arshidkv12
Copy link
Contributor Author

You are welcome

@arshidkv12 arshidkv12 deleted the posix_access branch February 6, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants