Skip to content

fix(Database): escape table and column names in SQLSRV Forge default constraint lookups - #10736

Merged
michalsn merged 1 commit into
codeigniter4:developfrom
gr8man:fix/sqlsrv-forge-alter-table-escape
Nov 12, 2026
Merged

michalsn merged 1 commit into
codeigniter4:developfrom
gr8man:fix/sqlsrv-forge-alter-table-escape

Conversation

@gr8man

@gr8man gr8man commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Description
SQLSRV\Forge::_alterTable() interpolated table and column names directly into default constraint lookup queries without escaping, which caused syntax errors when names contained quotes or special characters. This change properly 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 5, 2026
@gr8man
gr8man force-pushed the fix/sqlsrv-forge-alter-table-escape branch from 31f6488 to b209f47 Compare November 9, 2026 19:22
@gr8man
gr8man force-pushed the fix/sqlsrv-forge-alter-table-escape branch from b209f47 to 2837637 Compare November 12, 2026 10:12
@michalsn
michalsn merged commit 451d539 into codeigniter4:develop Nov 12, 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