Validate mirth.properties at startup and refuse to run on any invalid value
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start from Mirth.run() and how mirth.properties (plus conf/mirth.properties.d drop-ins from #405) is loaded and read ad-hoc (getInt, Boolean.parseBoolean, testPort). There is no central key/type/constraint registry yet; that schema and a fail-closed startup pass (plus a -t-style check mode) are the work. Done means any invalid value names the property and reason and the process never starts. This is design, not a first-timer patch.
由索引模型根據 Issue 內容生成。
描述
mirth.properties values are read ad-hoc across the codebase with inline defaults, and validation is inconsistent: some settings fail fast, some crash, some silently coerce. On adjacent lines of Mirth.run(), http.port = banana throws an uncaught ConversionException via isUsingHttp()'s default-less getInt and the server thread dies with a stack trace, while https.port = banana right next to it refuses to start cleanly with "port is invalid" (testPort). Booleans coerce to false (Boolean.parseBoolean), https.*.protocols passes through unvalidated, while a few settings do have ad-hoc guards (the DH key-size clamp, password requirements). Same class of mistake, different outcomes.
Target the model nginx (nginx -t), Apache (configtest), haproxy (-c), and sshd (-t) use: one validation pass over the whole merged config (base + conf/mirth.properties.d drop-ins, #405) at startup, refuse to run on any invalid value, with a clear message naming the property and the reason. Never start on a config that doesn't fully parse.
Why this is architectural, not a patch:
- No config schema exists. nginx validates everything because its parser is the schema; every directive has a known type and constraints.
mirth.propertieshas no central registry of valid key -> type -> constraints -> required. Step one is building that registry. - Validate the merged config against the registry at startup; fail closed with a per-property message on any type/range/enum violation.
- Mistyped keys can't be caught the way nginx catches an unknown directive:
htp.port = 8080silently leaveshttp.portat its default. The registry would need to flag unknown keys (warn or fail) - a design call. - Offer a check mode (
-t-style "validate and exit") so operators can test before a restart.
Context: came up during #405, which added fail-closed handling for unreadable/malformed drop-in files. This covers invalid values in readable files.
- 主要語言
- Java
- 星號
- 227
- 分支
- 81
- 平均合併
- 2 天 18 小時
- 30 天內合併 PR
- 12
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
OpenIntegrationEngine/engine 的其他 Issue
-
Outdated GitHub workflow action versions可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 68/100
OpenIntegrationEngine/engine#485 ·
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 62/100
OpenIntegrationEngine/engine#478 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
OpenIntegrationEngine/engine#355 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
OpenIntegrationEngine/engine#347 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
OpenIntegrationEngine/engine#313 ·
維護者通常 1 天內回覆
查看 OpenIntegrationEngine/engine 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
-
難度 2/5 1-3 小時 新手友好度 78/100
apache/rocketmq-dashboard#7302 ·
維護者通常 3 天內回覆
-
area: android good first issue help wanted testing
難度 2/5 1-3 小時 新手友好度 75/100
Gautam-aman/ResQNet#56 ·
維護者通常 1 天內回覆
-
documentation hermes-queue
難度 2/5 1-3 小時 新手友好度 72/100
chrisalunlloyd2-sudo/mindpalace#294 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
QuicksilverMC/Argentum#31 ·