http_static: a file outside the root is opened before it is refused, and 403 against 404 tells whether it exists
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
Start with open_static_file_confined in src/ext_http.c, then read the status handling and existing cases in tests/test_static_prefixes.py and tests/sections/45f-static-prefixes.sh. First run the stated oracle and FIFO checks under a timeout, then compare Go http.FileServer, nginx, and Python http.server for traversal, escaping symlinks, and missing files. Done means documenting that comparison and adding tests showing lookup is confined before opening and outside paths get the same answer as missing paths.
索引モデルが issue の本文から書いたものです。
説明
What. open_static_file_confined (src/ext_http.c) opens the requested file first and decides afterwards whether it lies under the static root: it builds static_dir + "/" + rel, calls open(filepath, O_RDONLY | O_CLOEXEC), reads the opened file's real path back through /proc/self/fd, and only then compares it with the root. The caller answers 404 when the open fails and 403 when the file opened but lies outside the root. rel reaches it with its .. segments intact (the caller refuses only a second leading slash).
Two consequences, read from the code on phase2-numbers at 6645d9cf; neither has been run yet:
- The two answers tell a client whether a path outside the root exists.
GET <prefix>/../../<anything>is 403 when the target exists and can be opened, and 404 when it does not. The suite pins exactly that pair (tests/test_static_prefixes.py:/../secretis 403,/missingis 404), so the difference is behaviour today, not an accident of one build. - The file outside the root is opened before it is refused, with neither
O_NOFOLLOWnorO_NONBLOCK. Opening a FIFO for reading blocks until a writer comes, so a path that resolves to one (through.., or through a symbolic link inside the root) can hold a worker; opening some device files has effects of its own.
The standard answer (to be filled by running each, not from memory, before the change is built): what Go's http.FileServer, nginx and Python's http.server answer for a .. path that leaves the root, for a symbolic link that leaves it, and for a missing file; and whether each opens anything outside the root on the way. The shape they are expected to share: the path is made safe before any file is opened (a .. cannot leave the root at all), and a client cannot tell "outside" from "missing".
Done when
- Shown by a run on the
serverbuild: a request whose path leaves the root through..gets a different status for an existing target than for a missing one (the oracle), and a request that resolves to a FIFO outside the root holds its worker (under atimeout, so the row cannot hang the suite). - The table of the three servers above, filled by running each, is on this issue, and the decision (which status, for which case) is recorded with it. If the answer for a path outside the root changes from 403,
tests/test_static_prefixes.py's rows change with it and the changelog fragment goes underchanges/breaking/. - Nothing outside the root is opened: the lookup is confined before the
open(the path refused or resolved beneath the root's own descriptor), shown by a row that plants a FIFO outside the root and a symbolic link to it inside, and gets its answer at once. - A client gets the same answer for "outside the root" and for "does not exist", for both the
..case and the link case; the rows that pin it fail on today's code. - The rows run in the hosted lanes that build the server (
tests/sections/45f-static-prefixes.sh), and a plant that puts theopenback before the check turns one of them red.
Found by an automated review of pushed commits on 2026-11-19; the code is unchanged by those commits (it came with #2362 and #2422).
— Claude DevBox
- 主要言語
- C
- スター
- 3
- フォーク
- 7
- 平均マージ
- 3時間 28分
- マージ済み PR(30日)
- 270
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
InauguralSystems/EigenScript のほかの issue
-
area:gates kind:gate-defect
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
InauguralSystems/EigenScript#2476 ·
メンテナーはふだん 1 日以内に返信
-
area:gates needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
InauguralSystems/EigenScript#2462 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
The hosted-RNG check refuses a clean tree that has a tracked file with a double quote in its nameオープンarea:gates kind:gate-defect needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
InauguralSystems/EigenScript#2461 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:gates kind:gate-defect needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
InauguralSystems/EigenScript#2458 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
`http_post`: `headers` text with something after its JSON value now means no headers, without a wordオープンarea:http kind:silent-wrong
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
InauguralSystems/EigenScript#2394 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
InauguralSystems/EigenScript の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
flipperdevices/flipperzero-firmware#4520 ·
メンテナーはふだん 1 日以内に返信
-
area/build-framework kind/enhancement priority/low
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
yugabyte/yugabyte-db#38826 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
meshcore-dev/MeshCore#3891 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug grammar sev-3
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
BUG/MEDIUM: regex: worker SIGSEGV when a regex is applied to an empty body on libc-regex buildsオープンstatus: needs-triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100