Fix Strict Handling Ignoring Unknown Underscore Search Params
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
Start at remove-query-param? in modules/fhir-structure/src/blaze/fhir/search_clauses.clj and trace where it runs relative to the Prefer: handling=strict check. The key question is which _ params count as result params (_count, _summary, _include) versus unknown ones, so the allowlist can be split. Reproduce with the three curl commands from the issue against a local build, and look at the fhir-structure tests around search clause handling. Done when _bogus and _type return 400 under strict, result params still pass, and lenient handling is unchanged.
Written by the indexing model from the issue text.
Description
Under Prefer: handling=strict, unknown search params return 400, except those starting with _, which are silently dropped.
docker run --rm -p 8080:8080 samply/blaze:1.13.0
curl -s -o /dev/null -w '%{http_code}\n' -H 'Prefer: handling=strict' 'localhost:8080/fhir/Patient?bogus=1' # 400
curl -s -o /dev/null -w '%{http_code}\n' -H 'Prefer: handling=strict' 'localhost:8080/fhir/Patient?_bogus=1' # 200, expected 400
curl -s -o /dev/null -w '%{http_code}\n' -H 'Prefer: handling=strict' 'localhost:8080/fhir?_type=Patient' # 200, expected 400
Impact: GET [base]?_type=Patient&_tag=sys|A returns every type tagged sys|A. A client deleting by that result hits resources it never selected, and strict handling gives no signal.
Cause: remove-query-param? in modules/fhir-structure/src/blaze/fhir/search_clauses.clj drops _-prefixed params not on its allowlist before the strict check sees them.
Expected: under strict, an unknown _ param returns 400, except result params (_count, _summary, _include, …). Lenient handling unchanged.
- Dominant language
- Clojure
- Stars
- 230
- Forks
- 27
- Avg merge
- 9h 20m
- Merged PRs (30d)
- 149
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from samply/blaze
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Fix Flaky integration-test-kds Load Data StepMay be free again A pull request for this issue was closed without being merged. Openci
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
module:cql
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
module:db
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
module:db module:terminology-service-local refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
SUM over a union column should skip an undefined slot, not throw ArrayIndexOutOfBoundsExceptionOpenexpression engine unshaved-yak
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
WG adoption
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
.Needs Triage .Team/UXWest Priority:P3 Type:Bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
metabase/metabase#88625 · 1 comment ·
Maintainers usually reply within 1 day
-
clojure easy first-contributor first-contributors good first issue help wanted up-for-grabs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
fork-commit-merge/fork-commit-merge#8749 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
unclebob/uml-viewer#18 ·