REST transport ignores interceptor changes to URL-bound request fields
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 55/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- Java
- Sterne
- 514
- Forks
- 200
- Ø Merge
- 1 T. 2 Std.
- Gemergte PRs (30 T.)
- 53
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus a2aproject/a2a-java
-
Document 1.x is the actively supported stream, and not 0.3.xEvtl. vergeben @Linux2010 hat das vor 2 Tagen übernommen. Offen
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 62/100
a2aproject/a2a-java#1321 ·
Maintainer antworten meist innerhalb von 1 Tag
-
HTTP+JSON CancelTask returns 409 Conflict instead of 400 Bad Request for TaskNotCancelableErrorEvtl. wieder frei @ravismash hat das vor 9 Tagen übernommen, und es ist kein Pull Request offen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
a2aproject/a2a-java#1298 · 5 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
fix: handle blank push notification config id consistently across transportsEvtl. vergeben @prachisinghal-1 hat das vor 23 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
a2aproject/a2a-java#1012 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
a2aproject/a2a-java#464 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Create a sample that demonstrates how to use a shared contextId across multiple tasksEvtl. wieder frei @tanish111 hat das vor 390 Tagen übernommen, und es ist kein Pull Request offen. Offensample
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
a2aproject/a2a-java#375 · 5 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in a2aproject/a2a-java
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
apache/skywalking#14239 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Re-executed query with IN condition on an index column returns deleted rows (stale IndexCursor)Evtl. vergeben @dbusche hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
h2database/h2database#4580 ·
Maintainer antworten meist innerhalb von 1 Tag
-
vips-drift
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
Stirling-Tools/JPDFium#300 ·
Maintainer antworten meist innerhalb von 1 Tag
-
hermes-queue
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 85/100
chrisalunlloyd2-sudo/mindpalace#403 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Guidelines: document how to build a use case against a local, unpublished Flow/browserless-test changeEvtl. vergeben @totally-not-ai hat das heute übernommen. Offen
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
vaadin/use-cases#452 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag