Skip to content

[v3-2-test] Apply reserved-key check to XCom update payload (#65915)#66913

Open
vatsrahul1001 wants to merge 1 commit into
v3-2-testfrom
backport-322-65915
Open

[v3-2-test] Apply reserved-key check to XCom update payload (#65915)#66913
vatsrahul1001 wants to merge 1 commit into
v3-2-testfrom
backport-322-65915

Conversation

@vatsrahul1001
Copy link
Copy Markdown
Contributor

@vatsrahul1001 vatsrahul1001 commented May 14, 2026

Cherry-pick of #65915

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.7)

Generated-by: Claude Code (Opus 4.7) following the guidelines

XComCreateBody (POST /xcomEntries) rejects payloads containing
reserved serialization keys (__classname__, __type, __var,
__data__, …) via a field_validator that walks the value
recursively. XComUpdateBody (PATCH /xcomEntries/{key}) was
missing the same validator, so a payload that POST correctly
rejects with 422 was accepted on PATCH and stored as-is.

Extracts the recursive walker to a module-level
_check_forbidden_xcom_keys helper and has both XComCreateBody
and XComUpdateBody delegate to it, so create and update apply
the same payload-key check from a single source. A parametrized
test mirroring the existing
test_create_xcom_entry_blocks_forbidden_keys covers the PATCH
path.

(cherry picked from commit c173489)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants