安全警告:Rack :: Session :: Cookie没有提供任何秘密选项

时间:2014-05-27 03:24:56

标签: ruby-on-rails ruby-on-rails-3.2

帮助我解决Rails Webrick服务器启动时的安全问题

rails 3.2.0 ruby​​ 1.9.3p545

prompt>> ~/work/depot$ rails s
=> Booting WEBrick
=> Rails 3.2.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
    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.

来自:/home/fernando/.rvm/gems/ruby-1.9.3-p545@pickaxe/gems/actionpack- 3.2.0 / lib / action_dispatch / middleware / session / abstract_store.rb:28:in,初始化”。

这些是我的宝石

    *** LOCAL GEMS ***

    actionmailer (3.2.0)
    actionpack (3.2.0)
    activemodel (3.2.0)
    activerecord (3.2.0)
    activeresource (3.2.0)
    activesupport (3.2.0)
    arel (3.0.3)
    bigdecimal (1.1.0)
    builder (3.0.4)
    bundler (1.5.3)
    bundler-unload (1.0.2)
    coffee-rails (3.2.2)
    coffee-script (2.2.0)
    coffee-script-source (1.7.0)
    erubis (2.7.0)
    execjs (2.0.2)
    executable-hooks (1.3.1)
    gem-wrappers (1.2.4)
    hike (1.2.3)
    i18n (0.6.9)
    io-console (0.3)
    journey (1.0.4)
    jquery-rails (3.1.0)
    json (1.8.1, 1.5.5)
    mail (2.4.4)
    mime-types (1.25.1)
    minitest (2.5.1)
    multi_json (1.10.1)
    polyglot (0.3.4)
    rack (1.4.5, 1.4.1)
    rack-cache (1.2)
    rack-ssl (1.3.4)
    rack-test (0.6.2)
    rails (3.2.0)
    railties (3.2.0)
    rake (10.3.2, 0.9.2.2)
    rdoc (3.12.2, 3.9.5)
    rubygems-bundler (1.4.2)
    rvm (1.11.3.9)
    sass (3.3.7)
    sass-rails (3.2.6)
    sprockets (2.1.3)
    sqlite3 (1.3.9)
    thor (0.14.6)
    tilt (1.4.1)
    treetop (1.4.15)
    tzinfo (0.3.39)
    uglifier (2.5.0)

0 个答案:

没有答案