Skip to content

std/dba: validate file permission argument in dba_open()#22228

Open
arshidkv12 wants to merge 2 commits into
php:masterfrom
arshidkv12:chmod-7
Open

std/dba: validate file permission argument in dba_open()#22228
arshidkv12 wants to merge 2 commits into
php:masterfrom
arshidkv12:chmod-7

Conversation

@arshidkv12

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread ext/dba/dba.c
Comment on lines +566 to +569
if (permission < 0 || (permission & ~07777) != 0) {
zend_argument_value_error(4, "Invalid file permission value (must be between 0 and 07777)");
RETURN_THROWS();
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it would be good to have some sort of global API for this, as many INI settings also should be checking valid permissions, and do all of those changes in one single PR rather than scattered around.

@arshidkv12 arshidkv12 Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Please check it #22302

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