1 Star 0 Fork 24

penelope/trafficserver

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2021-37147.patch 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
From 64f25678bfbbd1433cce703e3c43bcc49a53de56 Mon Sep 17 00:00:00 2001
From: Brian Neradt <brian.neradt@verizonmedia.com>
Date: Wed, 27 Oct 2021 13:35:41 -0500
Subject: [PATCH] Fix output '\n' HTTP field line endings (#8455)
This is another attempt to fix what was initially addressed in #8096 but
got backed out via #8305. That more extensive patch was considered too
invasive and potentially risky. This more targeted patch will fix
clients that only send the \n endings but it will force the \r\n line
ending on output.
This was mostly in place except for header lines that get
m_n_v_raw_printable set, which seems to be most header lines. The
addition checks to see if the header line ends in \r\n. If it does not
the m_n_v_raw_printable flag gets cleared and the logic that explicitly
adds the line endings while be invoked on output.
---
proxy/hdrs/MIME.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/proxy/hdrs/MIME.cc b/proxy/hdrs/MIME.cc
index 14e7ce352a6..729ec9da977 100644
--- a/proxy/hdrs/MIME.cc
+++ b/proxy/hdrs/MIME.cc
@@ -2580,6 +2580,8 @@ mime_parser_parse(MIMEParser *parser, HdrHeap *heap, MIMEHdrImpl *mh, const char
}
field_name.rtrim_if(&ParseRules::is_ws);
raw_print_field = false;
+ } else if (parsed.suffix(2) != "\r\n") {
+ raw_print_field = false;
}
// find value first
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/penelope_y/trafficserver.git
git@gitee.com:penelope_y/trafficserver.git
penelope_y
trafficserver
trafficserver
master

搜索帮助