1 Star 0 Fork 22

src-oepkgs-oE-rv/rubygem-actionpack

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2021-22904.patch 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
wang_yue111 提交于 2021-06-28 11:29 . Fix CVE-2021-22904
From f97d14a056c9b6ec6bf46d24e0c04b4893e78d41 Mon Sep 17 00:00:00 2001
From: Aaron Patterson <aaron@rubyonrails.org>
Date: Tue, 4 May 2021 15:49:21 -0700
Subject: [PATCH] Prevent slow regex when parsing host authorization header
The old regex could take too long when parsing an authorization header,
and this could potentially cause a DoS vulnerability
[CVE-2021-22904]
---
.../lib/action_controller/metal/http_authentication.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr/share/gems/gems/actionpack-5.2.4.4/lib/action_controller/metal/http_authentication.rb b/usr/share/gems/gems/actionpack-5.2.4.4/lib/action_controller/metal/http_authentication.rb
index 01676f3..d2e6674 100644
--- a/usr/share/gems/gems/actionpack-5.2.4.4/lib/action_controller/metal/http_authentication.rb
+++ b/usr/share/gems/gems/actionpack-5.2.4.4/lib/action_controller/metal/http_authentication.rb
@@ -406,7 +406,7 @@ module ActionController
module Token
TOKEN_KEY = "token="
TOKEN_REGEX = /^(Token|Bearer)\s+/
- AUTHN_PAIR_DELIMITERS = /(?:,|;|\t+)/
+ AUTHN_PAIR_DELIMITERS = /(?:,|;|\t)/
extend self
module ControllerMethods
--
2.23.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-oepkgs-oe-rv/rubygem-actionpack.git
git@gitee.com:src-oepkgs-oe-rv/rubygem-actionpack.git
src-oepkgs-oe-rv
rubygem-actionpack
rubygem-actionpack
master

搜索帮助