Skip to content

idempotency_key is sent in request JSON #114

@saxon134

Description

@saxon134

VideosResource.create and TasksResource.create build json_body from the full params dict, then separately use params.get("idempotency_key") to set the Idempotency-Key header. Passing idempotency_key therefore sends it both as a header and as a JSON field, for example client.videos.create(..., idempotency_key="idem_1") serializes an idempotency_key property in the body. APIs that validate payload schemas can reject otherwise valid idempotent create requests; remove header-only params before building the sync and async create payloads.

File: src/globalrouter/_resources.py

Line: 335

Severity: medium

Summary: idempotency_key leaks into create request bodies

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