Repository navigation
fix: end Oracle q-quoted literals at the first closing delimiter - #2893
Open
tanjiroK-coder wants to merge 1 commit into
Open
tanjiroK-coder wants to merge 1 commit into
tanjiroK-coder wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
q-quoted literals run on to the last closing delimiter
The S_CHAR_LITERAL alternatives for
q'[...]',q'{...}',q'(...)'andq''...''have a greedy body, so the longest match merges two such literals and everything between them into one StringValue. With or without Dialect.ORACLE,SELECT q'[a]' FROM t WHERE id IN (SELECT id FROM secrets) AND x = q'[b]'comes back as one literal and TablesNamesFinder.getTables returns no tables, so a table allowlist built on it can be bypassed, and the ordinaryq'[a]' || q'[b]'loses its Concat. Oracle ends the literal at the first closing delimiter followed by a quote, so the token bodies now exclude that pair and the match stops there; a delimiter inside a body, as inq'[a]b]', parses as before. Checked against Oracle's documented rule, not a live server.