Proxy responses can be served from the browser cache for the wrong catalog

Open
#267 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend, security

Research direction

Find the external-catalog proxy entry point and its existing tests, then trace how it forwards the target header and caching instructions. Add a test showing that a response cached for one catalog is not reused for another or after sign-out; the issue suggests making responses private and varying on the target header, or not forwarding caching instructions.

Written by the indexing model from the issue text.

Description

ready

Found by independent review of #266; older than that PR.

Every request through the external-catalog proxy uses the same address (/api/proxy); the catalog being asked for is carried in a request header. The proxy passes the external catalog's caching instructions through but does not tell the browser that the response depends on that header. If an external catalog allows caching, the browser could reuse one catalog's cached answer for a request aimed at another, and could show a cached answer after sign-out instead of the sign-in message. Read from the code; not reproduced in a browser.

Fix direction: mark proxy responses as private and varying on the target header, or do not pass caching instructions through.

Done when: a response cached for one catalog cannot be reused for another or after sign-out, with a test.

🤖 Generated with Claude Code

Dominant language
Python
Stars
0
Forks
2
Avg merge
8h 26m
Merged PRs (30d)
47

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TechTraverse/stac-higher

All issues in TechTraverse/stac-higher

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.