Skip to content

fix(Database): escape table string in SQLSRV Builder::_upsertBatch() Object_ID - #10734

Merged
paulbalandan merged 1 commit into
codeigniter4:developfrom
gr8man:fix/sqlsrv-builder-upsert-batch-escape
Nov 13, 2026
Merged

paulbalandan merged 1 commit into
codeigniter4:developfrom
gr8man:fix/sqlsrv-builder-upsert-batch-escape

Conversation

@gr8man

@gr8man gr8man commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Description
SQLSRV\Builder::_upsertBatch() concatenated the table name string directly into Object_ID('" . $table . "') without escaping, resulting in syntax errors on table names with quotes or special characters. It now properly escapes the table name using $this->db->escape($table).

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-builder-upsert-batch-escape branch 2 times, most recently from 1ff318d to 14efc34 Compare November 12, 2026 10:27
@gr8man
gr8man force-pushed the fix/sqlsrv-builder-upsert-batch-escape branch from 885e57b to 696d17a Compare November 12, 2026 22:41
@paulbalandan
paulbalandan merged commit 947a7fe 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.

3 participants