Skip to content

fix(Database): escape table, constraint, and schema in Forge::_dropKeyAsConstraint() - #10747

Merged
paulbalandan merged 1 commit into
codeigniter4:developfrom
gr8man:fix/forge-drop-key-as-constraint-escape
Nov 13, 2026
Merged

paulbalandan merged 1 commit into
codeigniter4:developfrom
gr8man:fix/forge-drop-key-as-constraint-escape

Conversation

@gr8man

@gr8man gr8man commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Description
Postgre, OCI8, and SQLSRV Forge::_dropKeyAsConstraint() interpolated table, constraint, and schema names directly in SQL queries without escaping, which could cause syntax errors or unintended queries when names contained quotes or special characters. This change escapes them using $this->db->escape().

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@carson-codeigniter4 carson-codeigniter4 Bot added the bug Verified issues on the current code behavior or pull requests that will fix them label Nov 8, 2026
Comment thread system/Database/OCI8/Forge.php Resolved
@gr8man
gr8man force-pushed the fix/forge-drop-key-as-constraint-escape branch from 08ba553 to 5565bca Compare November 9, 2026 18:44
@gr8man
gr8man force-pushed the fix/forge-drop-key-as-constraint-escape branch 2 times, most recently from efd69eb to af6bb56 Compare November 12, 2026 22:21
@gr8man
gr8man force-pushed the fix/forge-drop-key-as-constraint-escape branch from af6bb56 to be7a160 Compare November 13, 2026 10:12
@paulbalandan
paulbalandan merged commit 1c5c317 into codeigniter4:develop Nov 13, 2026
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants