【问题标题】:When is this Rack::Protection::FormToken a security issue?这个 Rack::Protection::FormToken 什么时候是安全问题?
【发布时间】:2013-10-30 01:21:33
【问题描述】:

Rack::Protection::FormToken 的标题评论说:

# This middleware is not used when using the Rack::Protection collection,
# since it might be a security issue, depending on your application

谁能描述这个中间件何时成为安全问题的例子?

【问题讨论】:

    标签: rack csrf-protection


    【解决方案1】:

    根据https://github.com/rkh/rack-protection/issues/38“FormToken 允许在没有令牌的情况下通过 xhr 请求。”

    因此,如果您依赖表单令牌并且没有采取额外措施来防止 xhr 请求,那么这可能会被视为安全风险。您可能会假设请求是真实的(因为它受 FormToken 保护 - 对吧!?),而实际上它是伪造的。通过强制您显式安装 FormToken,开发人员希望您检查它的作用并采取必要的步骤。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-05-29
      • 2013-01-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-01
      相关资源
      最近更新 更多