SearchOrganizations answers internal when filtering on name
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 ở internal/store/postgres/org_billing_repository.go tại addRQLFiltersInQuery, nơi danh sách cho phép thiếu name, sau đó so sánh với schema RQL trên AggregatedOrganization. Cũng kiểm tra ánh xạ postgres.ErrBadInput trong handler để bộ lọc không được hỗ trợ trả về invalid_argument. Hoàn thành khi bộ lọc name hoạt động, hoặc các trường không được hỗ trợ nhận invalid_argument kèm thông báo rõ ràng, và không trả về internal.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens
AdminService.SearchOrganizations answers internal (HTTP 500) when the query filters on name.
Example request body:
{"query": {"filters": [{"name": "name", "operator": "eq", "string_value": "my-org"}]}}
The server log says addRQLFiltersInQuery: name is not supported in filters. Filtering on title or state works.
Why
nameis a valid field ofAggregatedOrganization(rql:"name=name"), so the request passesrql.ValidateQueryin the handler.addRQLFiltersInQueryininternal/store/postgres/org_billing_repository.gohas its own allow list. It hasid,title,state,created_at,plan_name,subscription_state,subscription_cycle_end_at,plan_intervalandpayment_mode. It has noname, and it also leaves out other fields that the RQL schema allows, such ascreated_by,country,plan_id,updated_atandavatar.- The error it returns is a plain error. The handler only maps
postgres.ErrBadInputtoinvalid_argument, so the client getsinternalfor what is really a bad request.
Expected
- Either support filtering on
name(and the other fields the RQL schema lists), or reject the unsupported fields in the handler asinvalid_argumentwith a clear message. - In both cases an unsupported filter should not answer
internal.
How it was found
Found while testing organization delete against a local sandbox. It has nothing to do with deletes, and it behaves the same on main.
- Ngôn ngữ chính
- Go
- Star
- 344
- Fork
- 48
- Merge trung bình
- 1 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 38
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Không 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 raystack/frontier
-
Độ khó 3/5 1-2 ngày 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
-
Deleting an organization that has a disabled project fails and leaves it without ownersCó thể đã có người làm @rohilsurana đã nhận 5 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày 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
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của raystack/frontier
Issue tương tự
-
docs: namespaceRegexes example teaches prefix matching, but regexes are matched as a substringĐang mởtriage/pending-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
external-secrets/external-secrets#7117 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ENTERPILOT/GoModel#1183 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Edwin-metcalf/MetCode#16 ·
-
Action Required: Fix Renovate ConfigurationCó thể đã có người làm @thompson-tomo đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
open-telemetry/opentelemetry-collector#16170 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Buffer.writeRTX drops the RTCP returned by calc, so NACKs for other lost packets are never sentĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày