gpt4 book ai didi

ruby-on-rails - 没有为 Rack::Session::Cookie 警告提供 secret 选项?

转载 作者:行者123 更新时间:2023-12-03 04:42:13 25 4
gpt4 key购买 nike

我在 Fedora 17 下运行 Rails 3.2.3、Ruby 1.9。当我运行 rails s 时,我收到此警告,如何修复?

SECURITY WARNING: No secret option provided to Rack::Session::Cookie. This poses a security threat. It is strongly recommended that you provide a secret to prevent exploits that may be possible from crafted cookies. This will not be supported in future versions of Rack, and future versions will even invalidate your existing user cookies.

最佳答案

This is a Rails bug, as the subclass is violating the superclass API contract.

The warning can be safely ignored by Rails users.

( https://github.com/rack/rack/issues/485#issuecomment-11956708 ,已添加强调)

确认 Rails 错误讨论:https://github.com/rails/rails/issues/7372#issuecomment-11981397

关于ruby-on-rails - 没有为 Rack::Session::Cookie 警告提供 secret 选项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10374871/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com