Skip to content

fix(supervisor-network): preserve percent-encoded semicolon in L7 request path (closes #3902) - #3986

Closed
AmeerAliAnwar wants to merge 1 commit into
ai-openshell:mainfrom
AmeerAliAnwar:fix/l7-encoded-semicolon-path-truncation
Closed

AmeerAliAnwar wants to merge 1 commit into
ai-openshell:mainfrom
AmeerAliAnwar:fix/l7-encoded-semicolon-path-truncation

Conversation

@AmeerAliAnwar

Copy link
Copy Markdown

Description

Fixes #3902

canonicalize_request_target was percent-decoding the request path before stripping path parameters. This caused percent-encoded semicolons (%3B) to decode directly to literal ; (0x3B), making them indistinguishable from parameter delimiters. Consequently, strip_path_parameters truncated the path segment at %3B and discarded the remainder before forwarding the path upstream.

For example:

  • DELETE /objects/backup%3Bold was forwarded as DELETE /objects/backup
  • /a/%3Bx was forwarded as /a/

Changes

  1. Added ENCODED_SEMICOLON_SENTINEL (0x02), mirroring ENCODED_SLASH_SENTINEL.
  2. Updated percent_decode_with_sentinel to decode %3B to the sentinel rather than literal ;.
  3. Updated build_canonical_path to re-emit the sentinel as %3B.
  4. Added dot_segment_view so traversal detection (..%3B) still treats the encoded semicolon as ending the segment, preserving the path traversal security guard.
  5. Added comprehensive regression tests covering %3B preservation, trailing segment handling, uppercase normalization, literal ; parameter stripping, and dot-segment traversal resistance.

Testing

  • All canonicalizer unit and regression tests pass (38/38).
  • rustfmt --edition 2021 --check clean.

Copilot AI balanced review requested due to automatic review settings September 30, 2026 19:00
@copy-pr-bot

copy-pr-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

Thank you for your interest in contributing to OpenShell, @AmeerAliAnwar.

This project uses a vouch system for first-time contributors. Before submitting a pull request, you need to be vouched by a maintainer.

To get vouched:

  1. Open a Vouch Request discussion.
  2. Describe what you want to change and why.
  3. Write in your own words — do not have an AI generate the request.
  4. A maintainer will comment /vouch if approved.
  5. Once vouched, open a new PR (preferred) or reopen this one after a few minutes.

See CONTRIBUTING.md for details.

@github-actions github-actions Bot closed this Sep 30, 2026
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

All contributors have signed the DCO ✍️ ✅
Posted by the DCO Assistant Lite bot.

@AmeerAliAnwar

Copy link
Copy Markdown
Author

I have read the DCO document and I hereby sign the DCO.

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.

bug(network): L7 path canonicalization treats percent-encoded %3B as a path-parameter delimiter and silently truncates the forwarded path

2 participants