Skip to content

Fix URL query parameter decoding in OData V4 plugin#349

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-build-and-test-issues
Draft

Fix URL query parameter decoding in OData V4 plugin#349
Copilot wants to merge 3 commits intomainfrom
copilot/fix-build-and-test-issues

Conversation

Copy link
Contributor

Copilot AI commented Feb 4, 2026

OData V4 protocol tests failing on filter and sort operations. Query parameters with spaces (e.g., $filter=active eq true, $orderby=value desc) were URL-encoded as + but not decoded, causing parsing failures like "value+desc" instead of "value desc".

Changes

  • packages/protocols/odata-v4/src/index.ts: Replace + with spaces before decodeURIComponent() in parseODataQuery() method for both parameter keys and values (application/x-www-form-urlencoded standard)
// Before
const decodedKey = decodeURIComponent(key);
params[decodedKey] = decodeURIComponent(value || '');

// After  
const decodedKey = decodeURIComponent(key.replace(/\+/g, ' '));
const decodedValue = decodeURIComponent((value || '').replace(/\+/g, ' '));
params[decodedKey] = decodedValue;

Fixes 4 failing protocol TCK tests. All 126 OData V4 tests now pass.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/objectql/objectql/apps/site/node_modules/.bin/../next/dist/bin/next build (dns block)
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/objectql/objectql/apps/site/node_modules/.bin/../next/dist/bin/next build sh -c tsc git /opt/pipx_bin/node o | grep "physicpnpm (dns block)
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/objectql/objectql/apps/site/node_modules/.bin/../next/dist/bin/next build uniq k/ob�� (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

引用: https://github.com/objectstack-ai/objectql/actions/runs/21680253764/job/62512316619#step:9:1

fix all and build and test


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link

vercel bot commented Feb 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectql Ready Ready Preview, Comment Feb 4, 2026 5:11pm

Request Review

Fix URL encoding issue where '+' characters in query parameters were not being decoded to spaces. This was causing filter and orderBy parameters to be incorrectly parsed (e.g., "value+desc" instead of "value desc").

The fix replaces '+' with spaces before calling decodeURIComponent, following the application/x-www-form-urlencoded format specification.

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Apply code review feedback to also replace '+' with spaces in parameter keys before decoding, to handle edge cases where parameter names themselves contain spaces encoded as '+'.

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix all issues and initiate build and test Fix URL query parameter decoding in OData V4 plugin Feb 4, 2026
Copilot AI requested a review from hotlong February 4, 2026 17:09
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

⚠️ No Changeset Found

This PR does not include a changeset file.
If this PR includes user-facing changes, please add a changeset by running:

pnpm changeset

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.

2 participants