ESCROW_DEADLINE_SECONDS and PORT are parsed without validation — a typo makes every fund throw RangeError

オープン
#610 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@urielit1313-creator がすでに取り組んでいます。

2026年10月13日 から。

  • #623 @urielit1313-creator による — オープン
  • #655 @yggdrasilworld による — マージされずにクローズ
  • #689 @PINYOPATTANAWASANPORN による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
typescript
領域
backend

調査の方向性

Start in configuration.ts, where ESCROW_DEADLINE_SECONDS and PORT are parsed with parseInt and no NaN check, and read assertRequiredConfig to see how boot-time checks are done. Then trace resolveDeadline to see where the NaN reaches BigInt. Three open pull requests (#623, #655, #689) already target this, so check them before starting. Done means a non-numeric value fails at boot with a clear message.

索引モデルが issue の本文から書いたものです。

説明

bug good first issue

Problem

configuration.ts does parseInt(process.env.ESCROW_DEADLINE_SECONDS ?? '7776000', 10) and the same for PORT, with no NaN check. With ESCROW_DEADLINE_SECONDS=90d, resolveDeadline builds new Date(NaN), and BigInt(Math.floor(NaN / 1000)) throws RangeError: cannot convert NaN to BigInt on every escrow fund, after the PENDING row was already saved. assertRequiredConfig doesn't check numeric settings.

Suggested fix

Validate numeric env vars at boot (positive integers) and fail fast.

Related: #153

主要言語
TypeScript
スター
2
フォーク
90
平均マージ
31分
マージ済み PR(30日)
20

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MergeFi/backend のほかの issue

MergeFi/backend の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。