dev-mode key pair and healthcheck without a config file read a variable that is not UTF-8 as unset
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 75/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust
- 領域
- authentication, cli
調査の方向性
2 つの読み取り処理は、UTF-8 ではない環境変数の値を未設定として扱っています。1 つは crates/server/src/dev_credentials.rs の resolve_with 内にある non_empty クロージャ、もう 1 つは crates/app/src/cmd_healthcheck.rs の resolve_target 内にある std::env::var の呼び出しです。まず無効化スイッチ EXTENDDB_DEV_DISABLE_EXAMPLE_CREDENTIAL を読んでください。このスイッチは、そのような値を変数名を含むメッセージとともにすでに拒否しています。両者を比較してください。どちらかの読み取り処理で UTF-8 ではない値が与えられたときに、変数名を含むエラーが発生し、既存のエラー処理の経路がそのまま残っていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What happens
Two readers of ExtendDB variables read the process environment with their own code instead of the configuration loader. Both treat a value that is not UTF-8 as unset, and no message says that the value is not UTF-8. For an EXTENDDB__ variable, the configuration loader refuses such a value with an error that names it (#977).
Measured on 21 November 2026 with the dev-mode SQLite binary (--features sqlite-memory,dev-mode) of the fix for #977. Each case ran twice and gave the same answer both times.
The dev-mode key pair
A dev-mode build reads EXTENDDB_DEV_ACCESS_KEY_ID and EXTENDDB_DEV_SECRET_ACCESS_KEY as unset when their values are not UTF-8.
env $'EXTENDDB_DEV_ACCESS_KEY_ID=\xff' $'EXTENDDB_DEV_SECRET_ACCESS_KEY=\xfe' extenddb serve --foreground --port 18991
At 20:53 UTC, both runs served /health, and a ListTables signed with the documented example pair got HTTP 200. The startup output named only the example pair under "Sign requests with".
With only EXTENDDB_DEV_ACCESS_KEY_ID not UTF-8 and EXTENDDB_DEV_SECRET_ACCESS_KEY=abc, both runs at 20:58 UTC exited 1 with this message. The message says that the access key variable is not set:
Error: EXTENDDB_DEV_SECRET_ACCESS_KEY is set but EXTENDDB_DEV_ACCESS_KEY_ID is not; set both to seed an additional dev credential, or neither.
resolve_with in crates/server/src/dev_credentials.rs reads each variable of the pair through the non_empty closure. The closure maps a value that is not UTF-8 to None (.and_then(|v| v.into_string().ok())). The disable switch EXTENDDB_DEV_DISABLE_EXAMPLE_CREDENTIAL refuses such a value with a message that names it.
Healthcheck without a config file
With no config file, resolve_target in crates/app/src/cmd_healthcheck.rs reads EXTENDDB__SERVER__PORT and EXTENDDB__SERVER__BIND_ADDR with std::env::var. It treats Err(_) as unset. std::env::var also returns Err for a value that is not UTF-8. Its comment says that it reports a bad port instead of using the default port.
extenddb healthcheck --config <a path that does not exist>, with nothing on port 18443, at 20:52 UTC:
| Environment | Answer |
|---|---|
EXTENDDB__SERVER__PORT=abc |
exit 1, healthcheck failed: EXTENDDB__SERVER__PORT 'abc' is not a valid port: invalid digit found in string |
EXTENDDB__SERVER__PORT holds the byte 0xFF |
exit 1, healthcheck failed: Cannot connect to 127.0.0.1:18443: Connection refused (os error 111) |
EXTENDDB__SERVER__BIND_ADDR holds the byte 0xFF |
exit 1, the same Cannot connect to 127.0.0.1:18443 |
The byte 0xFF in the port gives the answer of an unset port. The probe goes to the default port, and the message does not name the variable.
On main, any variable that is not UTF-8 stops serve with a panic before it reads the key pair (#977). Neither reader changes in the fix for #977.
Expected
Each reader refuses a value that is not UTF-8 with a message that names the variable, as the disable switch and the configuration loader do.
- 主要言語
- Rust
- スター
- 517
- フォーク
- 60
- 平均マージ
- 3日 21時間
- マージ済み PR(30日)
- 116
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ExtendDB/extenddb のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 3 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ExtendDB/extenddb#1321 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 3 日以内に返信
ExtendDB/extenddb の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
topgrade-rs/topgrade#2540 ·
メンテナーはふだん 1 日以内に返信
-
Invalid JSON options for ngram and edge_ngram silently use defaults対応中かも @Tilendlesa が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
noemaforge/vimanam#153 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
mufeedvh/code2prompt#355 ·