Skip to content

Idempotency key is sent in both header and JSON body #84

@saxon134

Description

@saxon134

'TasksResource.create builds the JSON body from all keyword params and separately uses params.get("idempotency_key") for the Idempotency-Key header. Because _payload includes every non-None param, calling client.tasks.create(..., idempotency_key="idem") sends {"idempotency_key":"idem"} in the request body as well as the header. The same pattern exists for video creation. Strip SDK-only header params before building the JSON payload.

File: src/globalrouter/_resources.py

Line: 385

Severity: medium

Summary: idempotency key leaked into create payloads

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions