Skip to content

Add failing tests for content path injection - #126

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/content-id-query-injection-tests-6199
Draft

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/content-id-query-injection-tests-6199

Conversation

@cursor

@cursor cursor Bot commented Nov 20, 2026

Copy link
Copy Markdown

Summary

Adds tests that fail while endpoint and contentId are concatenated into the content API URL without being confined to a single path segment. A question mark, fragment, slash, backslash, or dot segment in either value changes the path or query of the request that is sent with the client API key.

These tests fail on purpose until that is fixed. They pass when the client rejects the value before issuing a request, or sends it as one encoded path segment whose query string is only the one the method built. A check that still requests the original string does not pass.

No product code is changed here.

How to run

npx jest tests/pathSegmentInjection.test.ts --coverage=false

Coverage

The tests call get, getList, getListDetail, getObject, getAllContentIds, getAllContents, create, update, and delete.

createManagementClient is not included. uploadMedia sends the constant path media, so a caller cannot supply the path segment these tests cover.

Open in Web Open in Cursor 

Cover get, getList, getListDetail, getObject, getAllContentIds,
getAllContents, create, update, and delete. The requests stay failing
until an endpoint or content id can no longer change the path or query.
@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ad8c3771-7799-4b49-8ab3-4f7f445ca271

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

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant