1. 07 8月, 2016 1 次提交
  2. 09 6月, 2016 1 次提交
  3. 07 12月, 2015 1 次提交
    • E
      Push `before_sending` to super class · 492b1344
      eileencodes 提交于
      We want to get rid of the `Live::Response` so we are consolidating methods
      from `Live::Response` and `Response` by merging them together.
      
      This adds an `#empty` method to the request so we don't need to
      hard-code the empty array each time we call an empty
      `ActionDispatch::Request`.
      
      The work here is a continuation on combining controller and integration
      test code bases into one.
      492b1344
  4. 02 10月, 2015 1 次提交
  5. 01 9月, 2015 1 次提交
    • E
      Fix bug where cookies mutated by request were not persisted · 75a121a2
      eileencodes 提交于
      With changes made in 8363b8 and ae291421 cookies that are mutated on the
      request like `cookies.signed = x` were not retained in subsequent tests,
      breaking cookie authentiation in controller tests.
      
      The test added demonstrates the issue.
      
      The reason we need to select from non-deleted cookies is because without
      checking the `@delete_cookies` the `cookie_jar` `@cookies` will send the
      wrong cookies to be updated. The code must check for `@deleted_cookies`
      before sending an `#update` with the requests cookie_jar cookies.
      This follows how the cookie_jar cookies from the request were updated
      before these changes.
      75a121a2
  6. 24 8月, 2015 1 次提交
  7. 28 6月, 2015 1 次提交
    • E
      Improve error messages in cookies_test · 4d7b5070
      eileencodes 提交于
      Using `assert_predicate` and `assert_match` instead of just `assert` is
      preferrable because better error messages are output.
      
      In the case of `assert response.cookies.empty?` the error message was
      `Failed assertion, no message given.` but now with `assert_predicate` it
      will be `Expected {"user_name"=>"david"} to be empty?.`
      
      For `assert_match(/user_name=david/,
      response.headers["Set-Cookie"])` as well, the message returned was
      unhelpful - `Failed assertion, no message given.` but now will tell what
      was expected and what was returned with `Expected /user_name=david/ to
      match "user_name=nope; path=/".`
      4d7b5070
  8. 04 12月, 2014 1 次提交
    • C
      Remove "rescue" clause around "require 'openssl'" · e428ddec
      claudiob 提交于
      Some `require 'openssl'` statements were surrounded by `rescue` blocks to deal with Ruby versions that did not support `OpenSSL::Digest::SHA1` or `OpenSSL::PKCS5`.
      
      [As @jeremy explains](https://github.com/rails/rails/commit/a6a0904fcb12b876469c48b1c885aadafe9188cf#commitcomment-8826666) in the original commit:
      
      > If jruby didn't have jruby-openssl gem, the require wouldn't work. Not sure whether either of these are still relevant today.
      
      According to the [release notes for JRuby 1.7.13](http://www.jruby.org/2014/06/24/jruby-1-7-13.html):
      
      > jruby-openssl 0.9.5 bundled
      
      which means the above `rescue` block is not needed anymore.
      
      All the Ruby versions supported by the current version of Rails provide those OpenSSL libraries, so Travis CI should also be happy by removing the `rescue` blocks.
      
      ---
      
      Just to confirm, with JRuby:
      
          $ ruby --version #=> jruby 1.7.16.1 (1.9.3p392) 2014-10-28 4e93f31 on Java HotSpot(TM) 64-Bit Server VM 1.8.0_20-b26 +jit [darwin-x86_64]
          $ irb
          irb(main):001:0> require 'openssl' #=> true
          irb(main):002:0> OpenSSL::Digest::SHA1 #=> OpenSSL::Digest::SHA1
          irb(main):003:0> OpenSSL::PKCS5 # => OpenSSL::PKCS5
      
      And with Ruby 2.1:
      
          $ ruby --version #=> ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
          $ irb
          irb(main):001:0> require 'openssl' #=> true
          irb(main):002:0> OpenSSL::Digest::SHA1 #=> OpenSSL::Digest::SHA1
          irb(main):003:0> OpenSSL::PKCS5 #=> OpenSSL::PKCS5
      e428ddec
  9. 03 12月, 2014 1 次提交
  10. 27 11月, 2014 1 次提交
  11. 27 8月, 2014 1 次提交
  12. 18 8月, 2014 3 次提交
  13. 13 8月, 2014 1 次提交
  14. 09 8月, 2014 2 次提交
  15. 24 4月, 2014 1 次提交
    • G
      Fixed an issue with migrating legacy json cookies. · 2a412b3d
      Godfrey Chan 提交于
      Previously, the `VerifyAndUpgradeLegacySignedMessage` assumes all incoming
      cookies are marshal-encoded. This is not the case when `secret_token` is
      used in conjunction with the `:json` or `:hybrid` serializer.
      
      In those case, when upgrading to use `secret_key_base`, this would cause a
      `TypeError: incompatible marshal file format` and a 500 error for the user.
      
      Fixes #14774.
      
      *Godfrey Chan*
      2a412b3d
  16. 11 2月, 2014 7 次提交
  17. 30 1月, 2014 2 次提交
    • G
      Modify the session serializer implementation · fd487860
      Guillermo Iguaran 提交于
      Rename allowed options to :marshal and :json, for custom serializers
      only allow the use of custom classes.
      fd487860
    • L
      Allow session serializer key in config.session_store · b23ffd0d
      Lukasz Sarnacki 提交于
      MessageEncryptor has :serializer option, where any serializer object can
      be passed. This commit make it possible to set this serializer from configuration
      level.
      
      There are predefined serializers (:marshal_serializer, :json_serialzier)
      and custom serializer can be passed as String, Symbol (camelized and
      constantized in ActionDispatch::Session namepspace) or serializer object.
      
      Default :json_serializer was also added to generators to provide secure
      defalt.
      b23ffd0d
  18. 30 4月, 2013 1 次提交
  19. 03 4月, 2013 3 次提交
  20. 29 3月, 2013 1 次提交
  21. 25 3月, 2013 2 次提交
  22. 19 2月, 2013 1 次提交
  23. 28 1月, 2013 1 次提交
  24. 26 1月, 2013 1 次提交
  25. 04 11月, 2012 3 次提交