Commit Graph

6204 Commits

Author SHA1 Message Date
Santiago Pastorino
38bf9cf368 Bump to 3.1.8 2012-08-09 16:22:39 -03:00
Santiago Pastorino
63e67ea1a6 Do not mark strip_tags result as html_safe
Thanks to Marek Labos & Nethemba

CVE-2012-3465
2012-08-09 15:58:33 -03:00
Santiago Pastorino
b6a0a1166f escape select_tag :prompt values
CVE-2012-3463
2012-08-09 15:49:08 -03:00
Aaron Patterson
d314a48a40 bumping to 3.1.7 2012-07-26 14:58:51 -07:00
Aaron Patterson
eb69ad2155 * Do not convert digest auth strings to symbols. CVE-2012-3424 2012-07-26 13:31:12 -07:00
Aaron Patterson
4e7d571918 bumping version numbers 2012-06-11 15:48:26 -07:00
Aaron Patterson
f4174ad429 Array parameters should not contain nil values. 2012-06-10 22:47:42 -05:00
Aaron Patterson
aa18c0cac0 bumping to 3.1.5 2012-05-31 10:42:35 -07:00
Aaron Patterson
a9c1898b3e Merge branch '3-1-stable-sec' into 3-1-rel
* 3-1-stable-sec:
  Strip [nil] from parameters hash. Thanks to Ben Murphy for reporting this!
  predicate builder should not recurse for determining where columns. Thanks to Ben Murphy for reporting this
2012-05-31 10:29:46 -07:00
Aaron Patterson
5b83bbfab7 Strip [nil] from parameters hash.
Thanks to Ben Murphy for reporting this!

CVE-2012-2660
2012-05-30 15:13:55 -07:00
Aaron Patterson
bd8ee8c912 bumping to 3.1.5.rc1 2012-05-28 11:54:56 -07:00
Rafael Mendonça França
a74b6a023b Merge pull request #3237 from sakuro/data-url-scheme
Support data: url scheme
2012-05-13 19:15:00 -03:00
Andrew White
e98893b189 Don't ignore nil positional arguments for url helpers - fixes #6196. 2012-05-10 22:07:14 +01:00
Andrew White
7336b33008 Refactor the handling of default_url_options in integration tests
This commit improves the handling of default_url_options in integration
tests by making behave closer to how a real application operates.

Specifically the following issues have been addressed:

* Options specified in routes.rb are used (fixes #546)
* Options specified in controllers are used
* Request parameters are recalled correctly
* Tests can override default_url_options directly
2012-05-10 21:33:31 +01:00
Dmitry Vorotilin
cf429711b0 Fix #3993 assets:precompile task does not detect index files 2012-05-04 16:30:36 +04:00
Andrew White
0cfa6b71f2 Reset the request parameters after a constraints check
A callable object passed as a constraint for a route may access the request
parameters as part of its check. This causes the combined parameters hash
to be cached in the environment hash. If the constraint fails then any subsequent
access of the request parameters will be against that stale hash.

To fix this we delete the cache after every call to `matches?`. This may have a
negative performance impact if the contraint wraps a large number of routes as the
parameters hash is built by merging GET, POST and path parameters.

Fixes #2510.
(cherry picked from commit 56030506563352944fed12a6bb4793bb2462094b)
2012-05-03 00:02:08 +01:00
Will Bryant
d625a7ac17 fix the Flash middleware loading the session on every request (very dangerous especially with Rack::Cache), it should only be loaded when the flash method is called 2012-04-30 00:20:17 -07:00
Andrew White
78c181b701 Escape interpolated params when redirecting - fixes #5688 2012-04-29 21:37:03 +01:00
Andrew White
8af2fd8891 Don't convert params if the request isn't HTML - fixes #5341
(cherry picked from commit d6bbd337ef)
2012-04-29 10:52:59 +01:00
Arun Agrawal
54d3645e93 :subdomain can now be specified with a value of false in url_for,
allowing for subdomain(s) removal from the host during link generation. 

Closes #4083

cherry-picked from 

de942e5534
96aa3bd0ea
2012-04-01 00:16:38 +05:30
José Valim
bef0b354e4 Avoid inspecting the whole route set, closes #1525 2012-03-27 19:57:47 +02:00
Carlos Antonio da Silva
a16aa8c3d2 Return the same session data object when setting session id
Make sure to return the same hash object instead of returning a new one.
Returning a new one causes failures on cookie store tests, where it
tests for the 'Set-Cookie' header with the session signature.

This is due to the hash ordering changes on Ruby 1.8.7-p358.
2012-03-26 16:18:20 -03:00
Aaron Patterson
47147a0555 Merge pull request #5456 from brianmario/redirect-sanitization
Strip null bytes from Location header
2012-03-15 14:58:49 -07:00
Aaron Patterson
11881ad478 Merge branch '3-1-4' into 3-1-stable
* 3-1-4:
  bumping to 3.1.4
  Ensure [] respects the status of the buffer.
  updating RAILS_VERSION
  use AS::SafeBuffer#clone_empty for flushing the output_buffer
  add AS::SafeBuffer#clone_empty
  fix output safety issue with select options
2012-03-01 09:51:21 -08:00
Aaron Patterson
1aabea698b bumping to 3.1.4 2012-03-01 09:20:24 -08:00
Aaron Patterson
d1fc35fe19 Merge branch '3-1-stable-security' into 3-1-4
* 3-1-stable-security:
  Ensure [] respects the status of the buffer.
  use AS::SafeBuffer#clone_empty for flushing the output_buffer
  add AS::SafeBuffer#clone_empty
  fix output safety issue with select options
2012-03-01 09:17:48 -08:00
Andrew White
5c18b995c1 Detect optional glob params when adding non-greedy regexp - closes #4817. 2012-02-26 00:29:43 +00:00
Justin Woodbridge
e6fca559a1 Fix typo in match :to docs 2012-02-25 21:55:11 +05:30
Aaron Patterson
8c677e921a updating RAILS_VERSION 2012-02-22 12:06:09 -08:00
Akira Matsuda
2d4cdb05a5 use AS::SafeBuffer#clone_empty for flushing the output_buffer 2012-02-20 16:16:38 -08:00
Sergey Nartimov
1be2bbec31 fix output safety issue with select options 2012-02-20 15:42:19 -08:00
Aaron Patterson
da7d0a26a1 search private / protected methods in trunk ruby 2012-02-20 11:04:27 -08:00
Andrew White
bea34a7729 Simplify regexp 2012-02-17 14:45:09 +00:00
Andrew White
5fcbb94edc Fix ActionDispatch::Static to serve files with unencoded PCHAR
RFC 3986[1] allows sub-delim characters in path segments unencoded,
however Rack::File requires them to be encoded so we use URI's
unescape method to leave them alone and then escape them again.

Also since the path gets passed to Dir[] we need to escape any glob
characters in the path.

[1]: http://www.ietf.org/rfc/rfc3986.txt
2012-02-17 14:16:45 +00:00
Piotr Sarnacki
238d80c24c Fix http digest authentication with trailing '/' or '?' (fixes #4038 and #3228) 2012-01-10 04:55:00 +01:00
Piotr Sarnacki
c2af40b679 Add original_fullpath and original_url methods to Request 2012-01-10 04:53:55 +01:00
Santiago Pastorino
b7c7f08c87 Pass extensions to javascript_path and stylesheet_path helpers. Closes #3417 2012-01-03 17:52:00 -02:00
José Valim
6d5a27aa6f Override respond_to? since we are also overriding method_missing. 2012-01-03 20:33:14 +01:00
Guillermo Iguaran
d7fbd63984 Use ProcessedAsset#pathname in Sprockets helpers when debugging is on. Closes #3333 #3348 #3361.
Is wrong use ProcessedAsset#to_s since it returns the content of the file.
2011-12-20 10:15:11 -05:00
Aaron Patterson
4371be2125 use Array#join so that file encoding doesn't impact returned string.
Fixes #3957
2011-12-12 19:47:25 -08:00
Aaron Patterson
e568c67b67 load the encoding converter to work around [ruby-core:41556] when switching encodings 2011-12-08 15:12:07 -08:00
José Valim
39528548b0 Improve cache on route_key lookup.
Conflicts:

	activemodel/lib/active_model/naming.rb
2011-12-08 20:38:09 +01:00
Santiago Pastorino
a2f4ef1d80 Merge pull request #3428 from adrianpike/asset_path_conflicts
Issue #3427 - asset_path_conflicts
2011-12-06 11:19:06 -02:00
Jonathan del Strother
0ce562c1f3 Leave default_asset_host_protocol unset
When default_asset_host_protocol is left as nil, it will use absolute protocols when a request is present, and relative protocols otherwise (eg in asset generation)

Signed-off-by: José Valim <jose.valim@gmail.com>
2011-12-01 13:19:38 +01:00
Uģis Ozols
7f6b1a58ac what's -> that's 2011-11-26 20:19:20 +05:30
Jon Leighton
e9474c89d9 Preparing for 3.1.3 release 2011-11-20 22:48:20 +00:00
Jon Leighton
1edef70e49 Don't html-escape the :count option to translate if it's a Numeric. Fixes #3685.
Conflicts:

	actionpack/CHANGELOG.md
2011-11-19 13:29:12 +00:00
Jon Leighton
8f4f8db945 Merge branch '3-1-2' into 3-1-stable 2011-11-19 11:09:35 +00:00
Jon Leighton
0e6b118313 Preparing for 3.1.2 release 2011-11-18 01:27:59 +00:00
lest
2d5b105d4b _html translation should escape interpolated arguments 2011-11-17 23:08:33 +00:00