aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
...
* Use request object for context if there's no controllerAndrew White2018-10-221-0/+10
| | | | | | | | There is no controller instance when using a redirect route or a mounted rack application so pass the request object as the context when resolving dynamic CSP sources in this scenario. Fixes #34200.
* Apply mapping to symbols returned from dynamic CSP sourcesAndrew White2018-10-221-0/+17
| | | | | | | | | | | | | | | Previously if a dynamic source returned a symbol such as :self it would be converted to a string implicity, e.g: policy.default_src -> { :self } would generate the header: Content-Security-Policy: default-src self and now it generates: Content-Security-Policy: default-src 'self'
* Fix `ActionController::Parameters#each_value` and add changelog entry to ↵Bogdan2018-10-151-0/+4
| | | | | | | | | | | | | this method (#34210) * Fix `ActionController::Parameters#each_value` `each_value` should yield with "value" of the params instead of "value" as an array. Related to #33979 * Add changelog entry about `ActionController::Parameters#each_value`. Follow up #33979
* Deprecate ActionDispatch::Http::ParameterFilter in favor of ↵Yoshiyuki Kinjo2018-10-081-0/+4
| | | | ActiveSupport::ParameterFilter
* Merge pull request #33256 from ilkkao/ilkkao/remove-unused-params-optionRyuta Kamizono2018-10-011-0/+4
|\ | | | | | | Don't handle params option in a special way in url_for helper
| * Don't handle params option in a special way in url_for helperIlkka Oksanen2018-08-201-0/+4
| |
* | Encode Content-Disposition filenames on send_data and send_fileFumiaki MATSUSHIMA2018-09-131-0/+12
| |
* | Formatting CHANGELOGs [ci skip]Ryuta Kamizono2018-09-071-1/+1
| | | | | | | | Fixing code block rendering, indentation, backticks, etc.
* | Faster permitted_scalar_filterschneems2018-08-311-0/+5
| | | | | | | | | | | | | | | | | | | | | | When running with code triage and derailed benchmarks and focusing on this file: Before 16199 /Users/rschneeman/Documents/projects/rails/actionpack/lib/action_controller/metal/strong_parameters.r After 2280 /Users/rschneeman/Documents/projects/rails/actionpack/lib/action_controller/metal/strong_parameters.rb
* | Fix `actionpack/CHANGELOG.md` [ci skip]bogdanvlviv2018-08-301-4/+2
|/ | | | | | | | | | Remove the reference to the PR. Usually, we write reference to solved issues in the changelog files. Related to #33605. Add missing dots. Improve formatting.
* Changelog for the new purpose metadata and improved testsAssain2018-08-131-0/+16
|
* :scissors: .Ryuta Kamizono2018-07-311-1/+1
| | | | [ci skip]
* Raises exception when respond_to called multiple times in incompatible wayPatrick Toomey2018-07-301-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nesting respond_to calls can lead to unexpected behavior, so it should be avoided. Currently, the first respond_to format match sets the content-type for the resulting response. But, if a nested respond_to occurs, it is possible to match on a different format. For example: respond_to do |outer_type| outer_type.js do respond_to do |inner_type| inner_type.html { render body: "HTML" } end end end Browsers will often include */* in their Accept headers. In the above example, such a request would result in the outer_type.js match setting the content- type of the response to text/javascript, while the inner_type.html match will cause the actual response to return "HTML". This change tries to minimize potential breakage by only raising an exception if the nested respond_to calls are in conflict with each other. So, something like the following example would not raise an exception: respond_to do |outer_type| outer_type.js do respond_to do |inner_type| inner_type.js { render body: "JS" } end end end While the above is nested, it doesn't affect the content-type of the response.
* Add implicit to path conversion to uploaded file (#28676)Aaron Kromer2018-07-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add implicit to path conversion to uploaded file Ruby has a few implicit conversion protocols (e.g. `to_hash`, `to_str`, `to_path`, etc.). These are considered implicit conversion protocols because in certain instances Ruby (MRI core objects) will check if an argument responds to the appropriate protocol and automatically convert it when it does; this is why you can provide a `Pathname` instance into `File.read` without having to explicitly call `to_s`. ```ruby a_file_path = 'some/path/file.ext' File.write a_file_path, 'String Path Content' File.read a_file_path a_pathname = Pathname(a_file_path) File.write core_file, 'Pathname Content' File.read a_file_path core_file = File.new(a_pathname) File.write core_file, 'File Content' File.read core_file tmp_file = Tempfile.new('example') File.write tmp_file, 'Tempfile Content' File.read tmp_file ``` So how does an uploaded file work in such cases? ```ruby tmp_file = Tempfile.new('example') File.write tmp_file, 'Uploaded Content' uploaded_file = ActionDispatch::Http::UploadedFile.new(tempfile: tmp_file) File.read uploaded_file ``` It fails with a `TypeError`: no implicit conversion of ActionDispatch::Http::UploadedFile into String In order to make an uploaded file work it must be explicitly converted to a file path using `path`. ```ruby File.read uploaded_file.path ``` This requires any code that expects path/file like objects to either special case an uploaded file, re-implement the path conversion protocol to use `path`, or forces the developer to explicitly cast uploaded files to paths. This last option can sometimes be difficult to do when such calls are deep within the inner workings of libraries. Since an uploaded file already has a path it makes sense to implement the implicit "path" conversion protocol (just like `File` and `Tempfile`). This change allows uploaded file content to be treated more closely to regular file content, without requiring any special case handling or explicit conversion for common file utilities. * Note uploaded file path delegation in CHANGELOG
* [ci skip] Strike changelog entry, since it's 5.2 backported.Kasper Timm Hansen2018-07-201-11/+0
|
* [ci skip] Move changelog entry up top. Clarify.Kasper Timm Hansen2018-07-201-7/+11
|
* Prevent `RequestEncoder#encode_params` to parse falsey paramsAlireza Bashiri2018-07-201-0/+7
| | | | | | | | | | | | | | When a `get` method called with `as: :json` and `params: nil` or `params: false` (explicitly or implicitly) `RequestEncoder#encode_params` converts it into a `null` or `false` value which includes a unexpected `null=` or `false` query string into request URL. From now on `RequestEncoder#encode_params` checks whether `params` is nil or not otherwise returns. Move down `nil` conversion guard Update CHANGELOG.md
* Pass along arguments to underlying `get` method in `follow_redirect!` (#33299)Remo Fritzsche2018-07-051-0/+10
| | | | | | | | | | | | | | | | * Allow get arguments for follow_redirect Now all arguments passed to `follow_redirect!` are passed to the underlying `get` method. This for example allows to set custom headers for the redirection request to the server. This is especially useful for setting headers that may, outside of the testing environment, be set automatically on every request, i.e. by a web application firewall. * Allow get arguments for follow_redirect [Remo Fritzsche + Rafael Mendonça França]
* Fix a typo in the Action Pack changelog [ci skip]Genadi Samokovarov2018-06-191-1/+1
| | | | I spotted it while working on a PR.
* Merge pull request #29286 from vinistock/create_missing_exact_template_exceptionRafael Mendonça França2018-04-201-0/+7
|\ | | | | | | Create MissingExactTemplate exception with separate template
* | Introduce ActionDispatch::DebugExceptions interceptorsGenadi Samokovarov2018-04-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Plugins interacting with the exceptions caught and displayed by ActionDispatch::DebugExceptions currently have to monkey patch it to get the much needed exception for their calculation. With DebugExceptions.register_interceptor, plugin authors can hook into DebugExceptions and process the exception, before being rendered. They can store it into the request and process it on the way back of the middleware chain execution or act on it straight in the interceptor. The interceptors can be play blocks, procs, lambdas or any object that responds to `#call`.
* | Revert "Merge pull request #32652 from ↵Rafael Mendonça França2018-04-191-12/+0
| | | | | | | | | | | | | | | | | | bogdanvlviv/add-missing-changelog-for-32593" This reverts commit 78ff47f3e77925f72d98579da6feb68f36052ad8, reversing changes made to daffe03308bffc43ea343a886aab33082d83bb9c. That changelog entry should only be on 5-2-stable
* | Add missing changelog entrybogdanvlviv2018-04-201-0/+12
| | | | | | | | | | | | | | | | https://github.com/rails/rails/pull/32593 was backported to `5-2-stable` but since 5.2.0 is released the changelog entry should be in Rails 6.0.0 too. [ci skip]
* | Fix reference to fixed issue in actionpack/CHANGELOG.mdbogdanvlviv2018-04-191-1/+1
| | | | | | | | | | | | Pull Request #32602 fixes Issue #32597. [ci skip]
* | Don't link issue number in CHANGELOG [ci skip]Andrew White2018-04-181-1/+1
| |
* | Pass nonce to CSP policy from outsideAndrew White2018-04-181-1/+1
| |
* | Output only one nonce in CSP header per requestAndrey Novikov2018-04-171-0/+6
| |
* | Include default headers by default in API modeKevin Deisz2018-04-061-0/+4
| | | | | | | | ActionDispatch's default headers are now moved into their own module that are by default included in both Base and API. This allows API-mode applications to take advantage of the default security headers, as well as providing an easy way to add more.
* | Add changelog entry for #32446bogdanvlviv2018-04-061-0/+4
| | | | | | | | | | | | | | In #32446 was added method `dig` to `session`. Improve docs of method `dig`. [ci skip]
* | Deprecate controller level force_sslDerek Prior2018-03-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today there are two common ways for Rails developers to force their applications to communicate over HTTPS: * `config.force_ssl` is a setting in environment configurations that enables the `ActionDispatch::SSL` middleware. With this middleware enabled, all HTTP communication to your application will be redirected to HTTPS. The middleware also takes care of other best practices by setting HSTS headers, upgrading all cookies to secure only, etc. * The `force_ssl` controller method redirects HTTP requests to certain controllers to HTTPS. As a consultant, I've seen many applications with misconfigured HTTPS setups due to developers adding `force_ssl` to `ApplicationController` and not enabling `config.force_ssl`. With this configuration, many application requests can be served over HTTP such as assets, requests that hit mounted engines, etc. In addition, because cookies are not upgraded to secure only in this configuration and HSTS headers are not set, it's possible for cookies that are meant to be secure to be sent over HTTP. The confusion between these two methods of forcing HTTPS is compounded by the fact that they share an identical name. This makes finding documentation on the "right" method confusing. HTTPS throughout is quickly becomming table stakes for all web sites. Sites are expected to operate over HTTPS for all communication, sensitive or otherwise. Let's encourage use of the broader-reaching `ActionDispatch::SSL` middleware and elminate this source of user confusion. If, for some reason, applications need to expose certain endpoints over HTTP they can do so by properly configuring `config.ssl_options`.
* | Don't need to include in the changelog something that was release in 5.2Rafael Mendonça França2018-03-151-4/+0
| | | | | | | | [ci skip]
* | Check exclude before flagging cookies as secure in ActionDispatch::SSL (#32262)Catherine Khuu2018-03-151-0/+4
| | | | | | | | | | | | | | * Check exclude before flagging cookies as secure. * Update comments in ActionDispatch::SSL. [Catherine Khuu + Rafael Mendonça França]
* | Remove changelog header for unreleased versionRafael Mendonça França2018-03-131-2/+0
| | | | | | | | | | | | We only add the header when releasing to avoid some conflicts. [ci skip]
* | Remove CHANGELOG entries which were backported to 5-2-stableRyuta Kamizono2018-02-281-5/+0
| |
* | Support for automatic nonce generation was backported to 5.2Guillermo Iguaran2018-02-241-28/+0
| |
* | Add support for automatic nonce generation for Rails UJSAndrew White2018-02-191-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because the UJS library creates a script tag to process responses it normally requires the script-src attribute of the content security policy to include 'unsafe-inline'. To work around this we generate a per-request nonce value that is embedded in a meta tag in a similar fashion to how CSRF protection embeds its token in a meta tag. The UJS library can then read the nonce value and set it on the dynamically generated script tag to enable it to execute without needing 'unsafe-inline' enabled. Nonce generation isn't 100% safe - if your script tag is including user generated content in someway then it may be possible to exploit an XSS vulnerability which can take advantage of the nonce. It is however an improvement on a blanket permission for inline scripts. It is also possible to use the nonce within your own script tags by using `nonce: true` to set the nonce value on the tag, e.g <%= javascript_tag nonce: true do %> alert('Hello, World!'); <% end %> Fixes #31689.
* | Rails 6 requires Ruby 2.4.1+Jeremy Daer2018-02-171-0/+6
|/ | | | | | Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug. References #32028
* Add changelog entry for #31844bogdanvlviv2018-02-011-0/+4
|
* Start Rails 6.0 development!!!Rafael Mendonça França2018-01-301-245/+1
| | | | :tada::tada::tada:
* Add 'Referrer-Policy' header to default headers setGuillermo Iguaran2018-01-081-0/+4
|
* Added deprecations and removals notes for Action Pack [ci skip]Prathamesh Sonpatki2018-01-071-1/+1
|
* Minor cleanup of CHANGELOG of PR #30850 [ci skip]Prathamesh Sonpatki2017-12-171-3/+3
|
* Change the system tests to set Puma as default server only when the user ↵Guillermo Iguaran2017-12-091-0/+5
| | | | haven't specified manually another server.
* Add secure `X-Download-Options` and `X-Permitted-Cross-Domain-Policies` to ↵Guillermo Iguaran2017-12-091-0/+5
| | | | default headers set.
* Add headless firefox driver to System Testsbogdanvlviv2017-12-071-0/+4
|
* Add changelog entry for 9d6e28eileencodes2017-11-301-0/+12
| | | | Since this changes a default setting a changelog entry is important.
* Register most popular audio/video/font mime types supported by modern browsersGuillermo Iguaran2017-11-281-0/+4
|
* Preparing for 5.2.0.beta2 releaseRafael Mendonça França2017-11-281-0/+5
|
* Fix optimized url helpers when using relative url rootAndrew White2017-11-281-0/+7
| | | | Fixes #31220.
* Preparing for 5.2.0.beta1 releaseRafael Mendonça França2017-11-271-0/+2
|