fix(oracle): SQL injection, view comment DOT, and pagination column leak#2052
Open
HandSonic wants to merge 3 commits into
Open
fix(oracle): SQL injection, view comment DOT, and pagination column leak#2052HandSonic wants to merge 3 commits into
HandSonic wants to merge 3 commits into
Conversation
tableName was concatenated directly into SQL without escaping. Table names
containing single quotes (e.g. O'Brien) would break SQL syntax or allow
injection. Now escapes single quotes with replace("'", "''").
View comment SQL was missing DOT between schema and view name identifiers, producing "SCOTT""MY_VIEW" instead of "SCOTT"."MY_VIEW".
When offset==0 (first page), the outer SELECT * FROM (...) wrapper was skipped, leaking CAHT2DB_AUTO_ROW_ID into the result set. Now both wrappers are always applied for consistent column schema across pages.
HandSonic
force-pushed
the
fix/oracle-sql-fixes
branch
from
July 24, 2026 14:01
da8b56e to
d15fa1c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 3 bugs in Oracle plugin:
OracleMetaData.tables()): escapes single quotes in table name viareplace("'", "''")instead of direct string concatenationOracleSqlBuilder.buildCreateView()): added missing.separator between schema and view name — was producing"SCOTT""MY_VIEW"instead of"SCOTT"."MY_VIEW"OracleSqlBuilder.buildPageLimit()): always applies outerSELECT * FROM (...)wrapper — previously skipped for first page, leakingCAHT2DB_AUTO_ROW_IDextra column into resultsSplit from #1926 per review feedback.