aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware/cookies.rb
Commit message (Collapse)AuthorAgeFilesLines
* Send cookies with requesteileencodes2015-07-071-0/+4
|
* Refactor cookie_jar to decouple it from request objecteileencodes2015-07-051-7/+3
| | | | | | This change decouples `cookie_jar` allocation from the request object. We need this for moving controller tests to integration tests so we can access the `cookie_jar` object separately.
* Document :tld_length option for cookies.Ryan Wallace2015-04-291-0/+3
|
* No need to capitalize verbs. [CI SKIP]Guo Xiang Tan2015-04-261-2/+2
|
* Add nodoc to some private constants [ci skip]Rafael Mendonça França2015-04-231-3/+3
|
* Merge pull request #19823 from sbhatore/doc_fix_1Rafael Mendonça França2015-04-231-0/+8
|\ | | | | [ci skip] Description inside Signed and Encrypted CookieJars added
| * Squashed commit of the following:Siddharth Bhatore2015-04-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | commit a88875ac6abaa4d8116b42af8cd71189ce3d44d3 Author: Siddharth Bhatore <sbhatore95@gmail.com> Date: Thu Apr 23 12:26:08 2015 +0530 [ci skip] Update doc fix cookies commit f175eaa7a21db898fc6c66334f770831028f9d00 Author: Siddharth Bhatore <sbhatore95@gmail.com> Date: Mon Apr 20 12:58:04 2015 +0530 Description inside Signed and Encrypted CookieJars added
* | [ci skip] UpgradeLegacySignedCookieJar Doc fixSiddharth Bhatore2015-04-221-2/+2
|/
* Changing sets -> set Lindsey Bieda2015-01-061-1/+1
| | | Updating some minor grammar issue.
* - Removed unused parameter to cookie serialize method and fixed usage of the ↵Vipul A M2014-12-241-4/+4
| | | | same elsewhere
* We don't need to call to_sym. Just compare the stringRafael Mendonça França2014-12-041-1/+1
|
* Merge pull request #17792 from rockrep/masterRafael Mendonça França2014-12-041-1/+1
|\ | | | | | | allow 'all' for :domain option in addition to :all
| * allow 'all' for :domain option in addition to :allrockrep2014-11-261-1/+1
| |
* | Merge pull request #17803 from sadfuzzy/patch-2Abdelkader Boudih2014-11-271-1/+3
| | | | | | | | | | | | Update cookies.rb Conflicts: actionpack/lib/action_dispatch/middleware/cookies.rb
* | `secret_token` is now saved in `Rails.application.secrets.secret_token`Benjamin Fleischer2014-11-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `secrets.secret_token` is now used in all places `config.secret_token` was - `secrets.secret_token`, when not present in `config/secrets.yml`, now falls back to the value of `config.secret_token` - when `secrets.secret_token` is set, it over-writes `config.secret_token` so they are the same (for backwards-compatibility) - Update docs to reference app.secrets in all places - Remove references to `config.secret_token`, `config.secret_key_base` - Warn that missing secret_key_base is deprecated - Add tests for secret_token, key_generator, and message_verifier - the legacy key generator is used with the message verifier when secrets.secret_key_base is blank and secret_token is set - app.key_generator raises when neither secrets.secret_key_base nor secret_token are set - app.env_config raises when neither secrets.secret_key_base nor secret_token are set - Add changelog Run focused tests via ruby -w -Itest test/application/configuration_test.rb -n '/secret_|key_/'
* | Use AS::JSON for (de)serializing cookiesGodfrey Chan2014-08-171-2/+3
| | | | | | | | | | | | | | | | Use the Active Support JSON encoder for cookie jars using the `:json` or `:hybrid` serializer. This allows you to serialize custom Ruby objects into cookies by defining the `#as_json` hook on such objects. Fixes #16520.
* | Merge pull request #16467 from strzalek/cookies-digest-config-option2Godfrey Chan2014-08-171-3/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | Cookies digest config option (pt. 2) Conflicts: actionpack/CHANGELOG.md actionpack/lib/action_dispatch/middleware/cookies.rb
| * | Add config option for cookies digestŁukasz Strzałkowski2014-08-121-3/+9
| | | | | | | | | | | | | | | | | | You can now configure custom digest for cookies in the same way as `serializer`: config.action_dispatch.cookies_digest = 'SHA256'
* | | Remove redundant NullSerializerŁukasz Strzałkowski2014-08-131-16/+7
|/ / | | | | | | Use one from ActiveSupport::MessageEncryptor module.
* | Use `#bytesize` instead of `#size` when checking for cookie overflowAgis-2014-07-111-2/+2
| | | | | | | | | | | | | | | | | | | | Although the cookie values happens to be ASCII strings because they are Base64 encoded, it is semantically incorrect to check for the number of the characters in the cookie, when we actually want to check for the number of the bytes it consists of. Furthermore it is unecessary coupling with the current implementation that uses Base64 for encoding the values.
* | Fix weird comment. [CI SKIP]Guo Xiang Tan2014-07-091-2/+2
| |
* | Fixed an issue with migrating legacy json cookies.Godfrey Chan2014-04-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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*
* | only write the jar if the response isn't committedAaron Patterson2014-03-121-5/+16
| | | | | | | | | | | | | | | | | | | | | | when streaming responses, we need to make sure the cookie jar is written to the headers before returning up the stack. This commit introduces a new method on the response object that writes the cookie jar to the headers as the response is committed. The middleware and test framework will not write the cookie headers if the response has already been committed. fixes #14352
* | :scissors:Zachary Scott2014-02-231-1/+1
| | | | | | | | This commit also addresses rails/docrails#169 and rails/rails#14159
* | rm warning about variable shadowingGodfrey Chan2014-02-111-2/+2
| |
* | Migrate hash-based cookie values correctlyGodfrey Chan2014-02-111-2/+4
| |
* | Re-write legacy (marshal) cookies on readGodfrey Chan2014-02-111-20/+40
| |
* | Added HybridSerializer to upgrade existing marshal cookies (wip: need tests)Godfrey Chan2014-02-111-0/+14
| |
* | Renamed session_serializer option to cookies_serializerGodfrey Chan2014-02-111-15/+30
| |
* | Updated the cookie docs to use the safer JSON.{generate,parse}Godfrey Chan2014-02-081-5/+5
| | | | | | | | cc @senny
* | Rely on backticks instead of tt tags [ci skip]Robin Dupret2014-02-081-2/+2
| | | | | | | | | | Since the language in code blocks is inferred, if the code contains tt tags, the block will be parsed as XML for instance while it is Ruby.
* | docs, Cookie values are String based. Closes #12860. [ci skip]Yves Senn2014-02-081-7/+7
| |
* | Modify the session serializer implementationGuillermo Iguaran2014-01-301-3/+5
| | | | | | | | | | Rename allowed options to :marshal and :json, for custom serializers only allow the use of custom classes.
* | Allow session serializer key in config.session_storeLukasz Sarnacki2014-01-291-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Update secret_key_base Docsrobertomiranda2013-12-151-8/+8
| |
* | Missing closing + in documentation [ci skip]Edho Arief2013-07-041-1/+1
| |
* | Grammar nazi at work [ci skip]Paweł Gościcki2013-06-121-1/+1
| |
* | Merge pull request #10061 from trevorturk/dummy-key-generator-renameSantiago Pastorino2013-04-021-1/+1
|\ \ | | | | | | Rename DummyKeyGenerator -> LegacyKeyGenerator
| * | Rename DummyKeyGenerator -> LegacyKeyGeneratorTrevor Turk2013-04-021-1/+1
| | |
* | | :scissors: spacing after privateTrevor Turk2013-04-021-3/+0
| | |
* | | Be consistent when talking about cookies, key -> nameTrevor Turk2013-04-021-25/+25
| | |
* | | Fix permanent cookie jar accessor typoTrevor Turk2013-04-021-1/+1
|/ /
* | Allow transparent upgrading of legacy signed cookies to encrypted cookies; ↵Trevor Turk2013-03-281-38/+77
| | | | | | | | Automatically configure cookie-based sessions to use the best cookie jar given the app's config
* | if cookie is tampered with then nil is returned [ci skip]Neeraj Singh2013-03-251-4/+2
| | | | | | | | | | | | if the given key is not found then verifier does raise `ActiveSupport::MessageVerifier::InvalidSignature` exception but this exception is resuced and finally nil is returned.
* | Introduce UpgradeLegacySignedCookieJar to transparently upgrade existing ↵Trevor Turk2013-03-241-99/+99
| | | | | | | | signed cookies generated by Rails 3 to avoid invalidating them when upgrading to Rails 4
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2013-02-261-1/+1
|\ \
| * | improve grammar describing ActionDispatch::Cookies::CookieJar#deleteWeston Platter2013-02-191-1/+1
| | |
| * | improve grammar describing ActionDispatch::Cookies::CookieJar#deleteWeston Platter2013-02-191-1/+1
| | |
* | | InvalidMessage is in ActiveSupport::MessageEncryptor namespaceSantiago Pastorino2013-02-191-1/+1
|/ / | | | | | | Closes #9302
* | Add missing require to APCarlos Antonio da Silva2013-02-081-0/+1
| |