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 小时
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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
-
难度 2/5 1-3 小时 新手友好度 68/100
metacpan/metacpan-api#1534 ·