Three search parameter forms get an HTTP 500 response or are silently ignored
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
調査の方向性
Start by locating the search parameter parsing and validation code for indexed names, case-insensitive duplicate parameters, and boolean values such as include_granule_counts; the issue does not name files or tests. Reproduce the three examples against the collections and granules search endpoints, then inspect the relevant validation tests. Done when each malformed form returns a 400 naming the parameter, or uppercase TRUE is handled the same as true.
索引モデルが issue の本文から書いたものです。
説明
Three search parameter forms get an HTTP 500 response or are silently ignored, where CMR rejects similar forms with a 400 response that names the parameter. The output below is from 2026-12-01.
1. An indexed sort_key is an HTTP 500 response
$ curl -sSg -w ' HTTP %{http_code}\n' 'https://cmr.earthdata.nasa.gov/search/granules.json?short_name=MOD11A2&page_size=0&sort_key[0]=-start_date'
{"errors":["An Internal Error has occurred."]} HTTP 500
Expected: a 400 response that names the parameter, as an indexed short_name gets:
$ curl -sSg -w ' HTTP %{http_code}\n' 'https://cmr.earthdata.nasa.gov/search/granules.json?short_name[0]=MOD11A2&page_size=0'
{"errors":["Parameter [short_name] must have a single value or multiple values."]} HTTP 400
2. A parameter given in both lower case and upper case keeps one value without an error
CMR accepts a parameter name in upper case as well as lower case, and rejects a parameter that takes a single value, such as page_size, when it is given twice. The commands below use a helper that prints the status, then the number of collections or the first error:
search() { curl -sS -w '%{http_code}' "https://cmr.earthdata.nasa.gov/search/collections.json?$1" | jq -rs '"HTTP \(.[1]), " + (.[0].errors[0] // "collections: \(.[0].feed.entry | length)")'; }
$ search 'PAGE_SIZE=2'
HTTP 200, collections: 2
$ search 'page_size=5&page_size=1'
HTTP 400, Parameter [page_size] must have a single value.
Given once in lower case and once in upper case, the parameter keeps one value and drops the other without an error, even when the dropped value is invalid:
$ search 'page_size=5&PAGE_SIZE=1'
HTTP 200, collections: 1
$ search 'PAGE_SIZE=1&page_size=5'
HTTP 200, collections: 5
$ search 'page_size=abc&PAGE_SIZE=1'
HTTP 200, collections: 1
Expected: the same 400 response as for page_size=5&page_size=1.
3. include_granule_counts=TRUE is neither honored nor rejected
include_granule_counts=true adds a granule_count to each collection, and a value such as 1 gets a 400 response. The commands below use a helper that prints the status, then the granule_count of the one collection that matches, or the first error:
counts() { curl -sS -w '%{http_code}' "https://cmr.earthdata.nasa.gov/search/collections.json?short_name=MOD11A2&page_size=1&include_granule_counts=$1" | jq -rs '"HTTP \(.[1]), " + (.[0].errors[0] // "granule_count: \(.[0].feed.entry[0].granule_count)")'; }
$ counts true
HTTP 200, granule_count: 389798
$ counts 1
HTTP 400, Parameter include_granule_counts must take value of true, false, or unset, but was [1]
Given as TRUE or True, the value gets a 200 response without the count:
$ counts TRUE
HTTP 200, granule_count: null
$ counts True
HTTP 200, granule_count: null
Expected: the count, as for true, or the 400 response that 1 gets.
- 主要言語
- Clojure
- スター
- 403
- フォーク
- 113
- 平均マージ
- 3日 2時間
- マージ済み PR(30日)
- 13
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nasa/Common-Metadata-Repository のほかの issue
-
API docs give the timeout header as CMR-Time-Out, without the "d" in CMR-Timed-Out対応中かも @kadnaoui が 7 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
nasa/Common-Metadata-Repository#2544 ·
メンテナーはふだん 1 日以内に返信
-
Reindexer returns server errors for impossible calendar dates再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nasa/Common-Metadata-Repository#2502 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
nasa/Common-Metadata-Repository#2548 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
nasa/Common-Metadata-Repository#2547 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
nasa/Common-Metadata-Repository#2546 ·
メンテナーはふだん 1 日以内に返信
nasa/Common-Metadata-Repository の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
nextjournal/clerk#830 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
IOP tokens release blocker team qa team qa autotests WG adoption
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
penpot/penpot#13540 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
izhangzhihao/intellij-rainbow-brackets#2903 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100