Skip to content

Fix Simple API cache poisoning via ?format=json - #1303

Merged
gerrod3 merged 1 commit into
pulp:mainfrom
gerrod3:cursor/fix-simple-api-cache-format-poison
Jul 27, 2026
Merged

Fix Simple API cache poisoning via ?format=json#1303
gerrod3 merged 1 commit into
pulp:mainfrom
gerrod3:cursor/fix-simple-api-cache-format-poison

Conversation

@gerrod3

@gerrod3 gerrod3 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • oci-env test -p pulp_python functional -- -k test_simple_cache -v
  • Confirm a ?format=json warm followed by the same Accept without format returns HTML 200 (not 500)

Made with Cursor

Key the Simple API cache on the negotiated media type so a JSON
response from ?format=json cannot be served for a later HTML request
with the same Accept header.

closes pulp#1302
Assisted By: Cursor Grok 4.5

Co-authored-by: Cursor <cursoragent@cursor.com>
@gerrod3
gerrod3 force-pushed the cursor/fix-simple-api-cache-format-poison branch from 3cf0fe4 to a16a5f0 Compare July 24, 2026 17:42
@gerrod3
gerrod3 marked this pull request as ready for review July 24, 2026 18:19
@gerrod3
gerrod3 merged commit 877e9e7 into pulp:main Jul 27, 2026
14 checks passed
@patchback

patchback Bot commented Jul 27, 2026

Copy link
Copy Markdown

Backport to 3.32: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.32/877e9e727c5dd6efb878d7f212ff46d6f8fe28f4/pr-1303

Backported as #1304

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@gerrod3
gerrod3 deleted the cursor/fix-simple-api-cache-format-poison branch July 27, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants