没有为 Rack::Session::Cookie 警告提供秘密选项? [英] No secret option provided to Rack::Session::Cookie warning?

查看:34
本文介绍了没有为 Rack::Session::Cookie 警告提供秘密选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Fedora 17 下运行 Rails 3.2.3、Ruby 1.9.我在运行 rails s 时收到此警告,我该如何解决?

I am running Rails 3.2.3, Ruby 1.9 under Fedora 17. I get this warning, when I run rails s, and how do I fix?

安全警告:没有提供给 Rack::Session::Cookie 的秘密选项.这构成了安全威胁.强烈建议您提供一个秘密来防止可能被精心制作的漏洞利用饼干.这在 Rack 的未来版本中将不支持,并且未来版本甚至会使您现有的用户 cookie 失效.

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.

推荐答案

这是一个 Rails 错误,因为子类违反了超类 API 合同.

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

Rails 用户可以安全地忽略警告.

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

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

Confirmation on the rails bug discussion: https://github.com/rails/rails/issues/7372#issuecomment-11981397

这篇关于没有为 Rack::Session::Cookie 警告提供秘密选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆