Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

REQBODY_ERROR "Extra content at the end of the document" after 3.0.15 update

未关闭
#3,563 11 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
活跃
技术栈
cpp, nginx
领域
security

调研方向

首先比较 ModSecurity v3.0.14 和 v3.0.15 之间的请求体 XML 解析,使用报告中描述的 REQBODY_ERROR 路径和 nginx connector 上下文。调查间歇性出现的“Extra content at the end of the document”日志,并建立一个可复现的请求;完成后应识别出 regression 或 trigger,并包含经过验证的修复或 regression test。

由索引模型根据 Issue 内容生成。

描述

3.x

Describe the bug

I updated from version 3.0.14 to 3.0.15 today. Unfortunately, I don't have a ton of helpful info, but I've noticed a few errors that I haven't seen before with REQBODY_ERROR tripping.

Logs and dumps

Here's an example nginx error log (with IP and domain changed).

body.xml:1: parser error : Extra content at the end of the document
2026/05/12 20:51:59 [error] 22751#22751: *430298 [client 123.123.123.123] ModSecurity: Access denied with code 400 (phase 2). Matched "Operator `Eq' with parameter `0' against variable `REQBODY_ERROR' (Value: `1' ) [file "/etc/nginx/modsec/modsecurity.conf"] [line "53"] [id "200002"] [rev ""] [msg "Failed to parse request body."] [data "XML parsing error: XML: Failed to parse document."] [severity "2"] [ver ""] [maturity "0"] [accuracy "0"] [hostname "example.com"] [uri "/"] [unique_id "177863351988.105338"] [ref "v269,1"], client: 123.123.123.123, server: example.com, request: "GET / HTTP/1.1", host: "example.com"

To Reproduce

Sorry, I don't know how to reproduce this. I've seen this a handful of times in millions of requests.

Server (please complete the following information):

  • ModSecurity version (and connector): ModSecurity v3.0.15 with nginx-connector v1.0.4
  • WebServer: nginx 1.26
  • OS (and distro): Amazon Linux 2

Rule Set (please complete the following information):

  • Running any public or commercial rule set? CRS
  • What is the version number? 4.26.0
主要语言
C++
星标
9.8k
派生
1.8k
平均合并
2 小时 46 分钟
30 天内合并 PR
1

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

owasp-modsecurity/ModSecurity 的其他 Issue

查看 owasp-modsecurity/ModSecurity 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。