| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
- Set sudo: false in .travis.yml which uses latest travis engine and fixes some failing specs
- Use older version of gems in Gemfile if RUBY_VERSION < '1.9.3' (no change to .gemspec)
- Fix two cases of hash rockets in tests (required for Ruby 1.8.7)
- Skip failing test "test_ensure_that_migration_tasks_work_with_mountable_option" which breaks due to Bundler no longer accepting the default generated .gemspec format.
- Skip railties specs on Ruby 1.8.7 (mark as an allowed failure.)
|
| |
|
|
|
|
|
|
| |
Many helpers mark content as HTML-safe without escaping double quotes -- including `sanitize`. Regardless of whether or not the attribute values are HTML-escaped, we want to be sure they don't include double quotes, as that can cause XSS issues. For example: `content_tag(:div, "foo", title: sanitize('" onmouseover="alert(1);//'))`
CVE-2016-6316
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`render(params)` is dangerous and could be a vector for attackers.
Don't allow calls to render passing params on views or controllers.
On a controller or view, we should not allow something like `render
params[:id]` or `render params`.
That could be problematic, because an attacker could pass input that
could lead to a remote code execution attack.
This patch is also compatible when using strong parameters.
CVE-2016-2098
|
|
|
|
|
|
|
|
|
|
| |
rails view directory
Conflicts:
actionpack/test/controller/render_test.rb
actionview/lib/action_view/template/resolver.rb
CVE-2016-0752
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
actionpack/CHANGELOG.md
|
| |
| |
| |
| |
| |
| |
| |
| | |
Before we were calling to_sym in the mime type, even when it is unknown
what can cause denial of service since symbols are not removed by the
garbage collector.
Fixes: CVE-2014-0082
|
| |
| |
| |
| |
| |
| |
| | |
Previously the values of these options were trusted leading to
potential XSS vulnerabilities.
Fixes: CVE-2014-0081
|
| |
| |
| |
| |
| |
| |
| | |
Escalate missing error when :raise is true in translate helper, fix regression introduced by security fix.
Conflicts:
actionpack/CHANGELOG.md
|
| |
| |
| |
| |
| |
| | |
Now users have to explicit mark the unit as safe if they trust it.
Closes #13161
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
i18n doesn't depend on active support which means it can't use our html_safe
code to do its escaping when generating the spans. Rather than try to sanitize
the output from i18n, just revert to our old behaviour of rescuing the error
and constructing the tag ourselves.
Fixes: CVE-2013-4491
Conflicts:
actionpack/lib/action_view/helpers/translation_helper.rb
Backport: 50afd8eec9d088ad5a2d41f00a05520d5b78a6a0
|
|
|
|
|
|
| |
Fixes CVE-2013-6415
Previously the values were trusted blindly allowing for potential XSS attacks.
|
| |
|
|
|
|
| |
Always escape the result of link_to_unless method
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
image_tag("HTTP://google.com")
# => "<img alt=\"Google\" src=\"/assets/HTTP://google.com\" />"
image_tag("http://google.com")
# => "<img alt=\"Google\" src=\"http://google.com\" />"
After:
image_tag("HTTP://google.com")
# => "<img alt=\"Google\" src=\"HTTP://google.com\" />"
image_tag("http://google.com")
# => "<img alt=\"Google\" src=\"http://google.com\" />"
Backport of #10969
|
|
|
|
| |
In those version to_date call Fixnum#/, what will cause a failure
|
| |
|
|
|
|
|
|
|
|
| |
If a file field tag is passed the multiple option, it is turned into an
array field (appending "[]"), but if the file field is passed an
explicit name as an option, leave the name alone (do not append "[]").
Fixes #9830
|
|
|
|
| |
Introduced in 2c22376fe04b89e8f34620139720b85a85ce3428
|
|
|
|
| |
and PartialRenderer
|
|
|
|
| |
Pathname doesn't respond to to_path
|
|
|
|
|
| |
The PR #8756 uses Sprockets for resolving files that already exists on disk, for those files their extensions don't need to be rewritten.
Fixes #9803
|
| |
|
|
|
|
|
| |
Conflicts:
actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix incorrectly appended square brackets to a multiple select box
Before:
select(:category, [], {}, {:multiple => true, :name => "post[category][]"})
# => <select name="post[category][][]" ...>
After:
select(:category, [], {}, {:multiple => true, :name => "post[category][]"})
# => <select name="post[category][]" ...>
Conflicts:
actionpack/CHANGELOG.md
actionpack/lib/action_view/helpers/tags/base.rb
actionpack/test/template/form_options_helper_test.rb
|
|
|
|
| |
few times, so fix up the test to work with however it chooses to escape.
|
|
|
|
| |
this file with us-ascii
|
|\
| |
| | |
Fix javascript_include_tag when no js runtime is available
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In a production environment where the assets have been precompiled, we
don't want an assets compile step to happen on the application server at
all. To ensure this, a js runtime may not be available on the app
servers. In this environment, pages using javascript_include_tag for
assets with non-standard or chained extensions were throwing 500 errors.
For instance, `javascript_include_tag('jquery.min')` would blow up.
Sprockets was attempting to build the assets being included during the
rewrite_extension step (responsible for appending a '.js' extension to
assets being included by the basename rather than a fully qualified
name). This was happening as a step to resolve #6310, which required
checking for the presence of an asset with a non-standard extension
before appending the extension.
We can check for the presence of an asset without invoking the asset
build step by using Sprockets' resolve method, which will search for the
base file without building it (and is the method that find_asset uses
internally to get the path to the asset before attempting to build it).
When rewriting the extension on an asset, these are the steps:
- If the source does not have an extension, assume that the default
extension is desired and append it.
- If there is an extension and it doesn't match the default extension,
check to see if a file with the precise name specified exists amongst
the assets; if it is present, do not append the default extension.
(This is the step that resolves #6310).
|
| |
| |
| |
| |
| | |
- addresses the problem by calling flatten on asset array before calling uniq.
- adds note to CHANGELOG.
|
|/
|
|
|
|
| |
Conflicts:
actionpack/lib/action_view/helpers/form_helper.rb
actionpack/test/template/form_helper_test.rb
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because DateTime#to_time returns self when it has a non-zero offset
and subtracting two DateTime instances returns a Rational then the
distance_of_time_in_words methods outputs an incorrect value.
This is fixed in master because we can rely on Ruby 1.9.3's
implementation of to_time but it can't be fixed on Ruby 1.8.7 as
there is no way to map the DateTime to a Time with a non-zero offset.
We can workaround the problem by casting to Float before doing
the subtraction in the distance_of_time_in_words method.
Closes #8390
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes the output of distance_of_time_in_words when
using integer or duration arguments. Previously a distance of
more than 30 seconds would be output as 'Less than 1 minute'
when using integer arguments and '1 minute' when using two
Time instances more than 30 seconds apart.
Cherry picked from 5fdd4cd9e47be972f146a8a17a74c8f4700e2ac0
|
|
|
|
|
|
|
| |
whether escaping is enabled. Fixes that existing plaintext email templates using <%== unexpectedly flipped to *escaping* HTML when #8235 was merged.
Conflicts:
actionpack/test/template/template_test.rb
|
|
|
|
|
|
|
|
|
| |
senny/8376_descriptive_error_message_for_partial_layout_true
More descriptive error when rendering a partial with `:layout => true`
Conflicts:
actionpack/CHANGELOG.md
actionpack/lib/action_view/renderer/partial_renderer.rb
|
|
|
|
| |
This is a backport of rails/rails#7997.
|
|
|
|
|
|
|
|
| |
Introduce `ActionView::Template::Handlers::ERB.escape_whitelist`
Conflicts:
actionpack/CHANGELOG.md
actionpack/test/template/template_test.rb
|
| |
|
|
|
|
|
|
|
| |
Support :multiple option on input tags that also have :index
Conflicts:
actionpack/lib/action_view/helpers/tags/base.rb
actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb
|
|
|
|
|
| |
Accept either :remote or 'remote' in both the html_options and
(url_)options hash arguments to link_to.
|
|
|
|
|
|
| |
This reverts commit 54f55746a70a7091341e84236498203118a7fbb4.
Reason: the last commit fixed the failing case
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 1ac19c11792a745cd654f02dfaed8e93f95b3c70.
Conflicts:
actionpack/CHANGELOG.md
Reason: This is causing failures in the railties build.
See http://travis-ci.org/#!/rails/rails/jobs/2491787
Related with #7672
|