aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge pull request #31720 from grantbdev/update_default_hsts_max_ageGuillermo Iguaran2018-02-242-7/+6
|\ \ \ \ \ | | | | | | | | | | | | Update default HSTS max-age value to 1 year
| * \ \ \ \ Merge branch 'master' into update_default_hsts_max_ageGuillermo Iguaran2018-02-24659-6371/+7493
| |\ \ \ \ \
| * | | | | | Update default HSTS max-age value to 1 yearGrant Bourque2018-01-163-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Update the default HSTS max-age value to 31536000 seconds (1 year) to meet the minimum max-age requirement for https://hstspreload.org/.
* | | | | | | Support for automatic nonce generation was backported to 5.2Guillermo Iguaran2018-02-241-28/+0
| |/ / / / / |/| | | | |
* | | | | | Support varying ICO filesGeorge Claghorn2018-02-244-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | Closes #32096.
* | | | | | [ci skip] Spell out the full variable in generated code.Kasper Timm Hansen2018-02-241-1/+1
| | | | | |
* | | | | | Correctly set `content_security_policy_nonce_generator`yuuji.yaginuma2018-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `content_security_policy_nonce_generator` specifies request as an argument when calling. https://github.com/rails/rails/blob/ddb7da8535b07f51b7a8f5e3062cc8ffbd4ff23b/actionpack/lib/action_dispatch/http/content_security_policy.rb#L100 So without this fix, will raise `ArgumentError` when start server.
* | | | | | Merge pull request #32093 from jfragoulis/correct-method-documentationYuji Yaginuma2018-02-241-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Correct method documentation
| * | | | | | Correct ActiveSupport::Deprecation::Behavior#behavior= documentationJohn Fragoulis2018-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The callback parameters need to reflect changes after https://github.com/rails/rails/pull/28800
* | | | | | | Merge pull request #32095 from bogdanvlviv/require_rails-ujs-in-generated-engineRafael França2018-02-232-1/+6
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Improve generated file `app/assets/javascripts/application.js` of plugin
| * | | | | | | Improve generated file `app/assets/javascripts/application.js` of pluginbogdanvlviv2018-02-232-1/+6
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add `//= require rails-ujs` Closes #32094
* / / / / / / Caching: MemCache and Redis stores use local cache for multi-readsGabriel Sobrinho2018-02-233-0/+32
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | Fixes #31909. Closes #31911.
* | | | | | More exercise range predicate builderRyuta Kamizono2018-02-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add test case for open-ended range. * Add test case for numeric range for string column.
* | | | | | PostgreSQL: Allow BC dates like datetime consistentlyRyuta Kamizono2018-02-233-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BC dates are supported by both date and datetime types. https://www.postgresql.org/docs/current/static/datatype-datetime.html Since #1097, new datetime allows year zero as 1 BC, but new date does not. It should be allowed even in new date consistently.
* | | | | | PostgreSQL: Treat infinite values in date like datetime consistentlyRyuta Kamizono2018-02-237-4/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The values infinity and -infinity are supported by both date and timestamp types. https://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-DATETIME-SPECIAL-TABLE And also, it can not be known whether a value is infinity correctly unless cast a value. I've added `QueryAttribute#infinity?` to handle that case. Closes #27585.
* | | | | | Use private attr_readerRyuta Kamizono2018-02-2312-26/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since #32028, Rails 6 requires Ruby 2.3+. No longer needed workaround for Ruby 2.2 "private attribute?" warning.
* | | | | | Merge pull request #32092 from yahonda/use_rubocop_0_52_at_codeclimateRafael França2018-02-221-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Use `rubocop-0-52` channel
| * | | | | | Use `rubocop-0-52` channelYasuo Honda2018-02-231-1/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | Since https://github.com/rails/rails/pull/32091 expects RuboCop 0.52.1
* | | | | | Merge pull request #32091 from utilum/update_rubocopRafael França2018-02-221-10/+9
|\ \ \ \ \ \ | | | | | | | | | | | | | | Update rubocop to the latest version
| * | | | | | Update rubocop to the latest versionutilum2018-02-231-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Includes [Switch Layout/SpaceBeforeBlockBraces's empty braces default](https://github.com/bbatsov/rubocop/pull/5263) from [0.52.1](https://github.com/bbatsov/rubocop/blob/master/CHANGELOG.md#0521-2017-12-27). Before: 131 offenses detected. After: no offenses detected
* | | | | | | Merge pull request #32089 from bogdanvlviv/fix-plugin-generated-filesRafael França2018-02-223-3/+17
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Fix plugin generated files
| * | | | | | Improve generated file `app/views/application.html.erb` of pluginbogdanvlviv2018-02-232-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Do not generate `javascript_include_tag` if `--skip-javascript` - Generate `<%= csp_meta_tag %>`. Related to #32018.
| * | | | | | Comment `require "active_storage/engine"` in `bin/rails` of plugin if ↵bogdanvlviv2018-02-232-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `--skip-active-storage`
* | | | | | | Merge pull request #32090 from ↵Rafael França2018-02-223-4/+4
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bogdanvlviv/remove-passing-extra-arguments-to-active-job-callbacks Remove passing extra arguments to ActiveJob Callbacks
| * | | | | | | Remove passing extra arguments to ActiveJob Callbacksbogdanvlviv2018-02-233-4/+4
| |/ / / / / /
* | | | | | | Revert "Merge pull request #32075 from eileencodes/delete-default-configuration"eileencodes2018-02-223-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 16f279ebd474626577ced858e3626ac4535a33df, reversing changes made to 6c6a30a7c357ce1eafa093d77d2b08684fe50887. The config can be named anything, not just default (although all generated apps will be named default). We can't just delete configs that don't have a database because that will break three-tier configs. Oh well.
* | | | | | | Revert "Reject empty database yamls"eileencodes2018-02-221-1/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0979713abe2e22083e1beca01a1d113408c9ab36. I originally wanted to delete the default config but found out it can be called anything which means the code would blow up in unexpected ways. I thought "cool ill just delete the configs without dbs" and realized that totally 100% breaks the three-tier config. So I'm reverting this and the other commit.
* | | | | | Merge pull request #32085 from rails/add-timezone-support-to-activejobAndrew White2018-02-2210-1/+103
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add support for timezones to Active Job
| * | | | | | Add support for timezones to Active JobAndrew White2018-02-2210-1/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Record what was the current timezone in effect when the job was enqueued and then restore when the job is executed in same way that the current locale is recorded and restored.
* | | | | | | Merge pull request #32018 from rails/add-nonce-support-to-cspAndrew White2018-02-2216-52/+207
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Add support for automatic nonce generation for Rails UJS
| * | | | | | | Add support for automatic nonce generation for Rails UJSAndrew White2018-02-1916-52/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | Merge pull request #32084 from buehmann/fix/escape-quoted-column-name-in-regexpRyuta Kamizono2018-02-221-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Properly escape column name embedded into regexp
| * | | | | | | | Properly escape column name embedded into regexpAndreas Bühmann2018-02-221-1/+1
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SQLServerAdapter (gem `activerecord-sqlserver-adapter`) uses square brackets for quoting column names (e.g. `[id]`). Those brackets must not be misinterpreted in regular expressions. Failure: Expected /SELECT [developers].[id].* FROM developers/ to match "SELECT [developers].[id], [developers].[name], [developers].[salary], [developers].[firm_id], [developers].[mentor_id], [developers].[created_at], [developers].[updated_at], [developers].[created_on], [developers].[updated_on] FROM developers".
* | / / / / / / Reject empty database yamlseileencodes2018-02-221-1/+1
| |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In #32075 I deleted the default configuration since that's what's generated with the Rails app. Since someone could change the default name instead delete any config that doesn't have a database so we can avoid peppering our Rails tasks with conditionals to deal with invalid database configs.
* | | | | | | Add cop for preferring 'Foo.method' over 'Foo::method'Andrew White2018-02-224-3/+7
| | | | | | |
* | | | | | | Merge pull request #32076 from utilum/use_dotAndrew White2018-02-224-8/+9
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Call methods with .method_name not ::method_name
| * | | | | | | We should call methods with `.method_name` not `::method_name`.utilum2018-02-224-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found several instances. Follow up on 63d530c5e68a8cf53603744789f53ccbc7ac1a0e
* | | | | | | | Do not add routes when actions are not specifiedYuji Yaginuma2018-02-222-0/+8
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since #30241, if namepsace is specified, routes will be generated even if there is no actions. However, it seems that this behavior is not intentionally added behavior. As with 5.1, routes should not be generated if actions are not specified. Fixes #32072.
* | | | | | | Call `YAML.load` correctlyeileencodes2018-02-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should call methods with `.method_name` not `::method_name`. Fix two instances of `YAML::load` I found in favor of `YAML.load`.
* | | | | | | Merge pull request #32075 from eileencodes/delete-default-configurationEileen M. Uchitelle2018-02-213-20/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Delete default configuration
| * | | | | | | Delete default configurationeileencodes2018-02-213-20/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of this default configuration we're constantly checking if the database exists when looping through configurations. This is unnecessary and we should just delete it before we need to loop through configurations.
* | | | | | | | Update to sinatra 2.0.1Andrew White2018-02-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although not a direct dependency, it's pulled in by Resque for Active Job integration tests so we need to update because the rack-protection gem has a security vulnerability[1]. [1]: https://nvd.nist.gov/vuln/detail/CVE-2018-7212
* | | | | | | | Add note to Active Storage guide about S3 permissions [ci skip]Andrew White2018-02-211-0/+2
| | | | | | | |
* | | | | | | | Allow S3 tests against buckets in other regionsAndrew White2018-02-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only us-east-1 gives URLs like bucket.s3.amazonaws.com whereas other regions have URLs like s3-eu-west-1.amazonaws.com/ubxd-rails
* | | | | | | | Merge pull request #32064 from yahonda/ci_with_jruby_headRyuta Kamizono2018-02-211-3/+3
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | CI with `jruby-head` compatible with Ruby 2.4.1
| * | | | | | | | CI with `jruby-head` compatible with Ruby 2.4.1Yasuo Honda2018-02-211-3/+3
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since #32034 Rails 6 requires Ruby 2.4.1 or higher. Two CI jobs configured with the latest version of`jruby-9.1.15.0` compatibile with Ruby 2.3.3 are getting errors: https://travis-ci.org/rails/rails/jobs/343519339 ``` Bundler could not find compatible versions for gem "ruby": In Gemfile: ruby java rails java was resolved to 6.0.0.alpha, which depends on ruby (>= 2.4.1) java Could not find gem 'ruby (>= 2.4.1)', which is required by gem 'rails', in any of the relevant sources: ```
* | | | | | | | Hoist update for clarityGeorge Claghorn2018-02-202-8/+8
| | | | | | | |
* | | | | | | | Undocument ActiveStorage::IdentificationGeorge Claghorn2018-02-201-1/+1
| | | | | | | |
* | | | | | | | Correct Range header syntaxGeorge Claghorn2018-02-201-1/+1
| | | | | | | |
* | | | | | | | Merge pull request #32026 from bogdanvlviv/improve-30941Rafael França2018-02-206-39/+69
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ |/| | | | | | | Improve ActiveJob custom argument serializers #30941