小编Mar*_*raf的帖子

生产现场自发真实性令牌拒绝的原因

我的Rails应用程序不时抛出一个ActionController :: InvalidAuthenticityToken.它每个月左右自发发生一次.因为我不认为有其他网站在尝试CSRF攻击,所以我开始对这些罕见的事件做出我的想法.我的结论到目前为止:

  • 随机机器人?
  • 人们等待太长时间才能发送表单以使其在服务器上过期?

是否有其他原因造成这种误报拒绝?

请不要解释CSRF是什么;-)

这是一些日志......

F, [2016-12-06T16:03:59.050673 #15136] FATAL -- : 
ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):
  actionpack (4.2.7) lib/action_controller/metal/request_forgery_protection.rb:181:in `handle_unverified_request'
  actionpack (4.2.7) lib/action_controller/metal/request_forgery_protection.rb:209:in `handle_unverified_request'
  devise (4.2.0) lib/devise/controllers/helpers.rb:253:in `handle_unverified_request'
  actionpack (4.2.7) lib/action_controller/metal/request_forgery_protection.rb:204:in `verify_authenticity_token'
  activesupport (4.2.7) lib/active_support/callbacks.rb:432:in `block in make_lambda'
  activesupport (4.2.7) lib/active_support/callbacks.rb:164:in `block in halting'
  activesupport (4.2.7) lib/active_support/callbacks.rb:504:in `block in call'
  activesupport (4.2.7) lib/active_support/callbacks.rb:504:in `each'
  activesupport (4.2.7) lib/active_support/callbacks.rb:504:in `call'
  activesupport (4.2.7) lib/active_support/callbacks.rb:92:in `__run_callbacks__'
  activesupport (4.2.7) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
  activesupport (4.2.7) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (4.2.7) lib/abstract_controller/callbacks.rb:19:in `process_action'
  actionpack (4.2.7) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (4.2.7) …
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails csrf csrf-protection

17
推荐指数
1
解决办法
590
查看次数

保存r脚本的输出,包括其命令

我想将我的r脚本输出的一部分(包括命令)保存到文本文件中.我知道, sink()但它不包括命令或我找不到这样做的具体选项.

是否有可能捕捉到的命令它的输出中 R对话.只需编写一个Rmd或在控制台内捕获输出就不是解决方案.

r output sink

4
推荐指数
1
解决办法
3119
查看次数

标签 统计

csrf ×1

csrf-protection ×1

output ×1

r ×1

ruby-on-rails ×1

sink ×1