Skip to content

fix(net): refuse navigation segments in published names - #6441

Merged
kixelated merged 3 commits into
mainfrom
codex/publish-navigation-segments
Oct 23, 2026
Merged

kixelated merged 3 commits into
mainfrom
codex/publish-navigation-segments

Conversation

@kixelated

@kixelated kixelated commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

A native publisher can create or announce a broadcast containing literal . or .. segments, including through a scoped producer root. Such names change meaning when represented as URLs. Both Rust and JavaScript origin insertion accepted them.

Approach

Refuse navigation segments when creating a broadcast or inserting an announced route. The current consumers are native publishers and sessions receiving their announcements. Validation runs on the full rooted name before inserting state; generic Path, Relative, and subscription semantics remain unchanged.

Impact

  • Broadcast and route publication now refuse literal . and .. segments. Hidden names such as .pro and names containing a..b remain valid.
  • Rust adds Error::NavigationSegment to its non-exhaustive error enum and uses existing protocol error codes. There is no new wire field or error code.
  • Migration notes describe renaming affected broadcasts or resolving relative references before publication.

Alternatives

Changing generic path normalization would also alter subscriptions and relative references. This change validates only publication. Existing empty-segment normalization is retained; strict refusal of raw empty publication fields needs a separate wire/API policy.

Validation

Both regression tests failed against the base implementations by accepting room/./cam.

Tested head: 6508bcf8c44e3446f712ac1cd54852de0dcde0c4 (merge of origin/main).

  • just check: passed (lint, compile, JS and Rust tests for the changed packages).
  • cargo nextest run -p moq-uring alone: 123 passed, 2 skipped, including endpoint::unsupported_version_is_negotiated_only_by_servers. The earlier ENOMEM failure was the shared per-user 8 MiB RLIMIT_MEMLOCK exhausted by concurrent test workers, not this change, which does not touch moq-uring.
  • Earlier head 1441aea8c3: @moq/net JavaScript tests 2,659 passed; just test interop --all passed (119 cases across the full client matrix).

Decisions

  • ✅ The moq-uring failure in the earlier full gate is the shared host RLIMIT_MEMLOCK limit, confirmed by an isolated rerun passing; it does not block this PR.

Follow-ups

Decide whether raw empty publication fields should be refused before normalization. This PR closes the independent literal-navigation publication gap.

(Written by GPT-6, updated by Claude Opus 5.5)

kixelated and others added 2 commits October 22, 2026 18:36
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
…ion-segments

# Conflicts:
#	js/net/MIGRATE.md
#	rs/moq-net/MIGRATE.md
#	rs/moq-net/src/model/origin.rs
@kixelated
kixelated marked this pull request as ready for review October 23, 2026 20:02
@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ 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: 0df95e9c-83f5-4e3a-bb93-8134a0bd0ef9
📥 Commits

Reviewing files that changed from the base of the PR and between b2899cc and 6508bcf.

📒 Files selected for processing: 7
  • js/net/MIGRATE.md
  • js/net/src/ietf/publisher.test.ts
  • js/net/src/origin.test.ts
  • js/net/src/origin.ts
  • rs/moq-net/MIGRATE.md
  • rs/moq-net/src/error.rs
  • rs/moq-net/src/model/origin.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T20:03:35.372956Z 6508bcf Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merging. Iterated to settle the maintainer's decisions, then chosen for /quest-merge. CI is green, the current head has a non-Grok review, and quest check passes against main.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 23, 2026
@kixelated
kixelated added this pull request to the merge queue Oct 23, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary: head 6508bcf is up to date with main, CI is green (10/10), the Codex thumbs-up landed after the last commit, and no review threads are open. quest check passes. No changes were made in this pass. The follow-up (refuse empty segments) is tracked in quest/m1/empty-segments.md and is intentionally not part of this PR. Auto-merge enabled on this head.

(Written by Sonnet 5.5)

Merged via the queue into main with commit e45064e Oct 23, 2026
10 checks passed
@kixelated
kixelated deleted the codex/publish-navigation-segments branch October 23, 2026 23:45
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