time: an invalid timezone that names a tzdata directory returns an error with the host's filesystem path
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue nà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
- 76/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ệ
- python
- Lĩnh vực
- backend-api-design, testing
Hướng nghiên cứu
Bắt đầu tại src/time/src/mcp_server_time/server.py ở get_zoneinfo, sau đó kiểm tra các bài kiểm thử giao thức cho get_current_time và convert_time. Tái hiện trường hợp thư mục với America và xác minh cả hai công cụ đều trả về lỗi Invalid timezone mà không có đường dẫn hệ thống tệp; kiểm tra để đảm bảo các lỗi múi giờ không xác định vẫn gọn gàng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
get_zoneinfo (src/time/src/mcp_server_time/server.py) turns any exception from loading a zone into ToolError(f"Invalid timezone: {e!s}"). For most bad names that is a clean "No time zone found" message, but a name that is a directory in the tz database (for example America) raises an OSError whose text includes the host's absolute path to the tzdata install, e.g.:
Invalid timezone: [Errno 21] Is a directory: '/Users/<user>/.../site-packages/tzdata/zoneinfo/America'
That leaks host filesystem details (including a home-directory user name) into tool output, and it is inconsistent with startup, where serve() already hides these messages.
Expected behavior
An invalid timezone always produces a fixed, clean message naming the input, such as Invalid timezone: America, with no exception text, whatever exception the zone loader raised.
Acceptance criteria
get_current_timeandconvert_timecalled with a tz-database directory name (America) return a cleanInvalid timezoneerror containing no filesystem path.- Existing error messages for unknown names are unchanged or equally clean.
- Tests cover the directory case at the protocol level.
- Ngôn ngữ chính
- TypeScript
- Star
- 92k
- Fork
- 12k
- Merge trung bình
- 3 giờ 12 phút
- Pull request đã merge (30 ngày)
- 174
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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/servers
-
enhancement server-filesystem v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
modelcontextprotocol/servers#5553 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement server-git v2
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
modelcontextprotocol/servers#5552 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore dependencies server-fetch v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
modelcontextprotocol/servers#5546 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore dependencies v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
modelcontextprotocol/servers#5545 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore server-everything v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
modelcontextprotocol/servers#5542 · 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/servers
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
marimo-team/marimo#11949 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Monsieur-Nico/textConvert#479 · 1 bình luận ·
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 82/100
router-for-me/Home-Management-Center#232 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster maturity:stable P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
openclaw/openclaw#200937 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug follow-up
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày