Skip to content

fix: validate session variable assignments - #18290

Open
WikiRik wants to merge 2 commits into
v6from
backport/18272-v6
Open

fix: validate session variable assignments#18290
WikiRik wants to merge 2 commits into
v6from
backport/18272-v6

Conversation

@WikiRik

@WikiRik WikiRik commented Jul 29, 2026

Copy link
Copy Markdown
Member

Backport of #18272 to v6.

sequelize.set() builds its SET statement by interpolating both keys and values directly. Values now go through the normal escaping path, and names are validated against the 1-64 character unquoted user-variable grammar.

Added unit coverage for the generated SQL and integration coverage for the round-trip.

Also pins pg-native to 3.7.0 on the Node 10 legs of the Postgres matrix. 3.8.0 uses ??, which Node 10 cannot parse, so requiring it throws a SyntaxError before any test runs. This is unrelated to the backport and was already failing on v6.

List of Breaking Changes

Quoted user-variable names, such as `my var`, 'x', or "x", are now rejected. Use an unquoted name matching the supported grammar.

🤖 Generated with Claude Code

Backport of #18272 to v6.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3a715ea6-1fff-44b3-a8f5-0c5644236be0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

pg-native 3.8.0 uses `??`, which Node 10 cannot parse, so requiring it
throws a SyntaxError before any test runs. Node 18 keeps using the
current release.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@WikiRik
WikiRik enabled auto-merge (squash) July 29, 2026 13:27
@WikiRik

WikiRik commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

@denyspakizh-tob what do you think about this PR?

@WikiRik
WikiRik disabled auto-merge July 29, 2026 18:04
@WikiRik WikiRik added the v6 label Jul 29, 2026
WikiRik pushed a commit that referenced this pull request Jul 29, 2026
pg-native 3.8.0 uses `??`, which Node 10 cannot parse, so requiring it throws a
SyntaxError before any test runs. Pin the last release Node 10 can load and
keep newer Node versions on the current one.

Ported from #18290 so that the backport there stays limited to its own change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@denyspakizh-tob

Copy link
Copy Markdown
Contributor

@denyspakizh-tob what do you think about this PR?

LGTM

@SippieCup SippieCup left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants