Skip to content

Fix GH-24640: tcadb handler allows injecting Tokyo Cabinet parameters via "#" - #24656

Closed
lazerg wants to merge 1 commit into
php:PHP-8.4from
lazerg:fix/gh-24640-tcadb-path
Closed

lazerg wants to merge 1 commit into
php:PHP-8.4from
lazerg:fix/gh-24640-tcadb-path

Conversation

@lazerg

@lazerg lazerg commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

tcadbopen() splits its name on # and treats everything after the first one as tuning parameters, so a dba_open() path containing # opened a different file than the one PHP's lock layer used, with extra parameters like bnum applied. Tokyo Cabinet has no way to escape #, so the tcadb handler now rejects such paths.

Fixes #24640

@LamentXU123 LamentXU123 left a comment

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.

Thank you.

LamentXU123 added a commit that referenced this pull request Nov 22, 2026
* PHP-8.6:
  Fix GH-24640: Reject "#" in tcadb paths (#24656)
opensource-fork-sync Bot pushed a commit to cla7aye15I4nd/opensource-php__php-src that referenced this pull request Nov 22, 2026
* PHP-8.4:
  Fix phpGH-24640: Reject "#" in tcadb paths (php#24656)
opensource-fork-sync Bot pushed a commit to cla7aye15I4nd/opensource-php__php-src that referenced this pull request Nov 22, 2026
* PHP-8.5:
  Fix phpGH-24640: Reject "#" in tcadb paths (php#24656)
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.

3 participants