Connection response header is seen by the rules on HTTP/2 responses
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- c, nginx
- 領域
- backend, networking
調査の方向性
The synthesized Connection and Keep-Alive headers are built in the response-header filter in src/ngx_http_modsecurity_header_filter.c, around lines 297-345, which the issue links. Read that block, then confirm how HTTP/2 and HTTP/3 streams are distinguished from HTTP/1 there. Done means RESPONSE_HEADERS contains no Connection or Keep-Alive for h2 and h3 responses while HTTP/1 behaviour is unchanged. Pull request #417 is already open against this issue, so check it before starting.
索引モデルが issue の本文から書いたものです。
説明
The response-header filter synthesizes a Connection header for the rules, because nginx only adds it in its terminal HTTP/1 header filter:
It does so for every request, including HTTP/2 (and HTTP/3) ones. Those protocols forbid connection-specific header fields (RFC 9113 §8.2.2, RFC 9114 §4.2) and nginx never sends them there, so on an HTTP/2 response the rules see Connection: close although no such header is sent:
listen 8443 ssl;
http2 on;
modsecurity_rules '
SecRuleEngine On
SecRule &RESPONSE_HEADERS:Connection "!@eq 0" "id:1,phase:3,deny,status:403"
';
Every HTTP/2 response to this location is a 403, while over HTTP/1 the rule behaves as written. A rule written against RESPONSE_HEADERS:Connection therefore false-positives on every HTTP/2 response.
(Keep-Alive comes from the same function but needs r->keepalive, which is never set on an HTTP/2 stream, so in practice only Connection is affected.)
Expected: no Connection / Keep-Alive in RESPONSE_HEADERS for HTTP/2 and HTTP/3 responses.
- 主要言語
- Perl
- スター
- 1.9k
- フォーク
- 312
- 平均マージ
- 2日 22時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
owasp-modsecurity/ModSecurity-nginx のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
owasp-modsecurity/ModSecurity-nginx#418 ·
メンテナーはふだん 1 日以内に返信
-
:1st_place_medal: good first issue enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
owasp-modsecurity/ModSecurity-nginx#359 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Relative Location response header is seen by the rules, nginx sends it absolute対応中かも @fzipi が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
owasp-modsecurity/ModSecurity-nginx#422 ·
メンテナーはふだん 1 日以内に返信
-
Transfer-Encoding and Connection response headers seen by the rules don't match the chunked filter's対応中かも @fzipi が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
owasp-modsecurity/ModSecurity-nginx#420 ·
メンテナーはふだん 1 日以内に返信
-
Documentation: Clarify dynamic module ABI compatibility with distribution-patched NGINX packages対応中かも @airween が今日担当しました。 オープンenhancement
owasp-modsecurity/ModSecurity-nginx#419 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
owasp-modsecurity/ModSecurity-nginx の issue をすべて見る
似ている issue
-
fix(rodex): sent mail loses the last character of title and body対応中かも @baphomello が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
inverse-inc/packetfence#9768 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
Package Update Update Bot
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
priv-kweihmann/meta-sca#13307 ·