bug(sdk/go): gateways with host-derived names (containing dots) cannot be loaded
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
- 72/100
Hướng nghiên cứu
Bắt đầu với validateGatewayName trong gateway/paths.go thuộc sdk/go/openshell/v1/gateway, rồi theo dõi cách LoadConfig, NewClient (bao gồm đường dẫn gateway đang hoạt động khi tên rỗng) và ListGateways gọi hàm này. Đọc các kiểm thử xác thực đường dẫn hiện có để xem những trường hợp duyệt ngược (traversal) nào đã được bao phủ. Hoàn thành khi các tên có dấu chấm như gw.example.com và máy chủ IPv4 được tải, liệt kê và xác định là đang hoạt động, đồng thời .. và dấu phân tách đường dẫn vẫn bị từ chối.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
User Story
I use OpenShell and build automation against its SDKs. While reviewing sdk/ I hit this behavior and reproduced it with the minimal test below against main. Any gateway added by URL without --name is affected.
Problem Statement
openshell gateway add https://gw.example.com derives the gateway name from the host (gw.example.com). The CLI accepts any single path component as a name, but the Go SDK's validateGatewayName rejects any name containing a dot (gateway/paths.go).
Impact / Why This Matters
gateway.NewClient("gw.example.com") and gateway.LoadConfig fail with invalid gateway name: name must not contain dots; when that gateway is the active one, NewClient("") fails too, and ListGateways() silently omits it. Users must re-register gateways under a dot-free name to use the Go SDK.
Acceptance Criteria
- The Go SDK loads, lists and resolves (as active) any gateway name the CLI can create, including host-derived names such as
gw.example.comand IPv4 hosts. - Path traversal (
.., separators) is still rejected.
Reproduction Steps
openshell gateway add https://gw.example.com(or create$XDG_CONFIG_HOME/openshell/gateways/gw.example.com/metadata.jsonwith{"gateway_endpoint":"https://gw.example.com:443","auth_mode":"none"}andactive_gateway=gw.example.com).- Call
gateway.LoadConfig("gw.example.com"),gateway.LoadConfig(""),gateway.ListGateways().
Suggested UX (if applicable)
No response
Environment
- OpenShell:
main@ 82977e2 (2026-10-13) - SDK: Go (
sdk/go/openshell/v1/gateway) - Toolchain: Go 1.25.4 linux/amd64, Node 22
Logs
gateway: invalid gateway name: name must not contain dots
gateway: no active gateway: active_gateway contains invalid name "gw.example.com": gateway: invalid gateway name: name must not contain dots
ListGateways omits the CLI-registered gateway
- Ngôn ngữ chính
- Rust
- Star
- 15.4k
- Fork
- 1.7k
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 374
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 NVIDIA/OpenShell
-
state:triage-needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
state:triage-needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug(sdk/go): edge (Cloudflare Access) token is cached for the client lifetime and never reloadedĐang mởstate:triage-needed
Độ 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
-
state:triage-needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
docs(upgrade): no migration notes for 0.1.1, 0.1.2, or 0.1.3 (only the 0.1.0 page exists)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởstate:triage-needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của NVIDIA/OpenShell
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
V1 manifest lists written by Java lose added/existing/deleted file countsCó thể đã có người làm @kacper-li-airspace-intelligence đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/iceberg-rust#3445 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
sync: small cleanups after #69Đang mởarea::tern-sync kind::cleanup triage::ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
review-bot
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
midagedev/bloomery#160 · 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 62/100
oxidecomputer/humility#737 ·