[v2] URI template strict expansions leave !'()* unencoded
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 84/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- api
調査の方向性
packages/core-internal/src/shared/uriTemplate.ts から始め、UriTemplate.expand() と encodeValue() に焦点を当ててから、Node.js 24 以降で repro.mjs の例を実行します。simple と query の展開で !'()* が示されているとおりパーセントエンコードされ、reserved と fragment の展開では許可された文字が保持されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What happened?
UriTemplate.expand() leaves !'()* unchanged in simple expansions. Query values have the same problem: search{?q} with q: 'hello!' produces search?q=hello!.
encodeURIComponent() leaves these characters unchanged, and encodeValue() returns that output directly for strict expansion operators.
What did you expect?
Expected output from the snippet below:
%21%27%28%29%2A
search?q=hello%21
RFC 6570 section 3.2.1 permits unreserved characters in strict variable expansions. The five characters above are reserved and need percent-encoding. Reserved and fragment expansions can keep them.
Code to reproduce
Save this as repro.mjs at the SDK repository root and run node repro.mjs with Node.js 24 or later. It imports the source module directly.
import { UriTemplate } from './packages/core-internal/src/shared/uriTemplate.ts';
const value = "!'()*";
console.log(new UriTemplate('{value}').expand({ value }));
console.log(new UriTemplate('search{?q}').expand({ q: 'hello!' }));
Current output:
!'()*
search?q=hello!
SDK version
main at e16d27729ea2fae144a6d957fd0372d9eb0e6c58 (v2 source checkout). Tested with Node.js 24.12.0.
Area
Other
- 主要言語
- TypeScript
- スター
- 13.5k
- フォーク
- 2.3k
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 51
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/typescript-sdk のほかの issue
-
Stateless 405 response omits the Allow header対応中かも @Hugo-DDT が今日担当しました。 オープンv2
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
modelcontextprotocol/typescript-sdk#2970 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[v2] @modelcontextprotocol/server inlines fast-uri 3.1.0, which has 9 published advisories対応中かも @Andiii208 が 2 日前に担当しました。 オープンv2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
modelcontextprotocol/typescript-sdk#2966 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
v1 v2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
modelcontextprotocol/typescript-sdk#2946 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
[v2] URI template reserved expansions encode existing %HH sequences again対応中かも @takagibit18 が 9 日前に担当しました。 オープンv1 v2
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
modelcontextprotocol/typescript-sdk#2920 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Malformed params on spec request methods return -32603 Internal error instead of -32602 Invalid params対応中かも @Gauravtiwari31 が 9 日前に担当しました。 オープンv1 v2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelcontextprotocol/typescript-sdk#2916 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
modelcontextprotocol/typescript-sdk の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
cline/mcp-marketplace#2932 ·
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
lingdojo/kana-dojo#32188 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Portkey-AI/gateway#1844 ·
メンテナーはふだん 1 日以内に返信
-
needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 61/100
rjsf-team/react-jsonschema-form#5495 ·
メンテナーはふだん 2 日以内に返信