[v2] URI template reserved expansions encode existing %HH sequences again
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 84/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- api
Hướng nghiên cứu
Bắt đầu với packages/core-internal/src/shared/uriTemplate.ts và chạy repro.mjs được cung cấp bằng Node.js 24 trở lên. Cập nhật UriTemplate.expand() để các phép mở rộng reserved và fragment giữ nguyên các chuỗi %HH hợp lệ hiện có, đồng thời vẫn mã hóa các dấu phần trăm khác; repro sẽ tạo ra hai đầu ra như mong đợi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened?
UriTemplate.expand() encodes the percent sign in an existing escape during reserved (+) and fragment (#) expansion. A path containing My%20File.txt becomes My%2520File.txt.
What did you expect?
Expected output from the snippet below:
file:///docs/My%20File.txt
docs#Part%20One
RFC 6570 section 3.2.1 allows existing percent-encoded triplets in reserved and fragment values. An ordinary percent sign, or a percent sign without two following hex digits, still needs encoding.
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';
console.log(new UriTemplate('file://{+path}').expand({ path: '/docs/My%20File.txt' }));
console.log(new UriTemplate('docs{#section}').expand({ section: 'Part%20One' }));
Current output:
file:///docs/My%2520File.txt
docs#Part%2520One
SDK version
main at e16d27729ea2fae144a6d957fd0372d9eb0e6c58 (v2 source checkout). Tested with Node.js 24.12.0.
Area
Other
- Ngôn ngữ chính
- TypeScript
- Star
- 13.5k
- Fork
- 2.3k
- Merge trung bình
- 2 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 54
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelcontextprotocol/typescript-sdk
-
v1 v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
modelcontextprotocol/typescript-sdk#2946 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[v2] URI template strict expansions leave !'()* unencodedCó thể đã có người làm @takagibit18 đã nhận 3 ngày trước. Đang mởv1 v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
modelcontextprotocol/typescript-sdk#2919 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Malformed params on spec request methods return -32603 Internal error instead of -32602 Invalid paramsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởv1 v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/typescript-sdk#2916 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Unconditional `prompt=consent` (when `offline_access` in scope) blocks OAuth in Entra tenants with user consent disabled + admin consent grantedCó thể đã có người làm @dasjideepak đã nhận 9 ngày trước. Đang mởv1 v2
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
modelcontextprotocol/typescript-sdk#2867 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
v1 v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
modelcontextprotocol/typescript-sdk#2854 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của modelcontextprotocol/typescript-sdk
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
solana-foundation/solana-com#2245 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`document.cookie` with `max-age=0` does not delete the cookieCó thể đã có người làm @BartInTheField đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
capricorn86/happy-dom#2460 ·
Maintainer thường phản hồi trong vòng 2 ngày