REST transport ignores interceptor changes to URL-bound request fields
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Start in RestTransport.getTask, where the protobuf builder is intercepted but the URL is built from taskQueryParams instead of the intercepted payload. Run the JUnit HTTP-server regression, which expects GET /tasks/changed and currently gets /tasks/original. Then check the other operations that put IDs or filters into the URL. Done means the URL follows the post-interceptor payload for GetTask and the other affected operations, with the regression passing.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened?
The ClientCallInterceptor.intercept contract permits returning a modified payload, but the HTTP+JSON RestTransport builds resource paths and query strings from the original method arguments rather than the post-interceptor payload. An interceptor can therefore change the task ID in the payload and still send the request to the original task.
On main 897835ef664fb5c9fc4e1f5388e88a49c93e743c, a GetTask interceptor like the following receives the protobuf request builder:
@Override
public PayloadAndHeaders intercept(String method, Object payload,
Map<String, String> headers, AgentCard card, ClientCallContext context) {
((org.a2aproject.sdk.grpc.GetTaskRequest.Builder) payload).setId("changed");
return new PayloadAndHeaders(payload, headers);
}
Call getTask(new TaskQueryParams("original"), null) with this interceptor and capture the request using a local HTTP server. Expected: GET /tasks/changed. Actual: GET /tasks/original, despite the interceptor returning the modified builder. A JUnit HTTP-server regression reproduces this as expected: </tasks/changed> but was: </tasks/original>.
RestTransport.getTask creates and intercepts a protobuf builder, but constructs the URL using taskQueryParams. Other operations that encode IDs or filters into their URL also appear to construct those from the original arguments; each should be checked rather than assuming only GetTask is affected. This can matter for interceptors that rewrite a target or apply a filter, not just logging.
For context, #1327 adds fields to the GetTask payload visible to interceptors but does not make modified fields drive the URL. I have not checked every operation's replacement-payload semantics; this report's demonstrated case is a mutation of the supplied builder.
Code of Conduct
- I agree to follow this project's Code of Conduct
- Ngôn ngữ chính
- Java
- Star
- 514
- Fork
- 200
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 53
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 a2aproject/a2a-java
-
Document 1.x is the actively supported stream, and not 0.3.xCó thể đã có người làm @Linux2010 đã nhận 2 ngày trước. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 62/100
a2aproject/a2a-java#1321 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
HTTP+JSON CancelTask returns 409 Conflict instead of 400 Bad Request for TaskNotCancelableErrorCó thể làm lại được @ravismash đã nhận 9 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
a2aproject/a2a-java#1298 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix: handle blank push notification config id consistently across transportsCó thể đã có người làm @prachisinghal-1 đã nhận 23 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
a2aproject/a2a-java#1012 · 2 bình luận · 1 người được giao ·
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 65/100
a2aproject/a2a-java#464 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Create a sample that demonstrates how to use a shared contextId across multiple tasksCó thể làm lại được @tanish111 đã nhận 390 ngày trước và không có pull request nào đang mở. Đang mởsample
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
a2aproject/a2a-java#375 · 5 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của a2aproject/a2a-java
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/skywalking#14239 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Re-executed query with IN condition on an index column returns deleted rows (stale IndexCursor)Có thể đã có người làm @dbusche đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
h2database/h2database#4580 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
vips-drift
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Stirling-Tools/JPDFium#300 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
hermes-queue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
chrisalunlloyd2-sudo/mindpalace#403 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Guidelines: document how to build a use case against a local, unpublished Flow/browserless-test changeCó thể đã có người làm @totally-not-ai đã nhận hôm nay. Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
vaadin/use-cases#452 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày