提交 fee0bc57 编写于 作者: A Aaron Patterson

* Do not convert digest auth strings to symbols. CVE-2012-3424

Conflicts:
	actionpack/lib/action_controller/metal/http_authentication.rb
上级 90c9ae58
......@@ -229,9 +229,9 @@ def decode_credentials_header(request)
end
def decode_credentials(header)
Hash[header.to_s.gsub(/^Digest\s+/,'').split(',').map do |pair|
HashWithIndifferentAccess[header.to_s.gsub(/^Digest\s+/,'').split(',').map do |pair|
key, value = pair.split('=', 2)
[key.strip.to_sym, value.to_s.gsub(/^"|"$/,'').delete('\'')]
[key.strip, value.to_s.gsub(/^"|"$/,'').delete('\'')]
end]
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册