Jeremy Kemper
79670fb975
request.parameters doesn't overwrite request.request_parameters. Closes #9949 [nullstyle]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7992 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-22 21:10:56 +00:00
David Heinemeier Hansson
f777ff72f9
Changed before_filter halting to happen automatically on render or redirect but no longer on simply returning false [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7984 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-21 18:58:17 +00:00
Rick Olson
c9fecf20ff
Ensure that cookies handle array values correctly. Closes #9937 [queso]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7978 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-20 17:30:01 +00:00
Jeremy Kemper
a2172e75f5
Dispatcher: fix that to_prepare should only run once in production. Closes #9889 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7944 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-16 16:36:52 +00:00
Jeremy Kemper
5cb6a9aabd
Improve the error message for assert_redirected_to. Closes #7337 [mikong, sandofsky]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7934 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-16 05:07:23 +00:00
Jeremy Kemper
ae8179f05c
Expand Routes::DynamicSegment test coverage. Closes #7122 [Kevin Clark]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 04:27:31 +00:00
Jeremy Kemper
86a9c212c0
Skip memcache tests unless it's installed
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 01:47:35 +00:00
Jeremy Kemper
6e56cc013f
Wrap test with uses_mocha
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7888 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-14 22:54:28 +00:00
Jeremy Kemper
d0df7f2b12
Memcached sessions: add session data on initialization; don't silently discard exceptions; add unit tests. Closes #9823 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-14 20:46:06 +00:00
Michael Koziarski
bd03bf9f5e
Make sure that custom inflections are picked up by map.resources by triggering a routing reload when new inflections are defined. Closes #9815 [mislav, kampers]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7849 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-13 03:28:35 +00:00
Jeremy Kemper
4db4661a67
rescue_from accepts :with => lambda { |exception| ... } or a normal block. Closes #9827 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7822 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-10 02:34:42 +00:00
Michael Koziarski
4aabe46341
Add :status to redirect_to allowing users to choose their own response code without manually setting headers. Closes #8297 [codahale, chasgrundy]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7820 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-09 23:07:36 +00:00
Jeremy Kemper
8a2fa23cd1
Add tests for [7727]. Closes #6090 [dkubb, mpalmer, tarmo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7793 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 03:33:30 +00:00
Jeremy Kemper
d9f3c435f9
Fix url_for, redirect_to, etc. with :controller => :symbol instead of 'string'. Closes #8562 , #9525 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7776 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 19:12:02 +00:00
Jeremy Kemper
52ca5dad1e
Use StringIO and Tempfile subclasses instead of defining singleton methods on each multipart field.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7759 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 11:40:13 +00:00
Jeremy Kemper
3405fb3dea
Rewind stdin if possible after multipart parsing.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7758 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 09:39:31 +00:00
Rick Olson
904df818d6
Move ActionController::Routing.optimise_named_routes to ActionController::Base.optimise_named_routes. Now you can set it in the config.
...
ActionController::Routing::DynamicSegment#interpolation_chunk should call #to_s on all values before calling URI.escape. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7724 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-03 05:47:41 +00:00
Jeremy Kemper
0ee1cb2cd3
Ruby 1.9 compat, consistent load paths
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-02 05:32:14 +00:00
David Heinemeier Hansson
860cf2d44e
Fixed that render template did not honor exempt_from_layout ( closes #9698 ) [pezra]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7701 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-30 22:59:24 +00:00
David Heinemeier Hansson
7275d2749c
Fixed JSON encoding to use quoted keys according to the JSON standard ( closes #8762 ) [choonkat/chuyeow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7697 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-30 20:57:50 +00:00
Michael Koziarski
9660360d6b
Re-enable Routing optimisation code for _url methods, add defined?(request) to the guard conditions
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7673 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-28 20:57:39 +00:00
Rick Olson
82ff27766d
Better error messages if you leave out the :secret option for request forgery protection. Closes #9670 [rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7671 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-28 16:50:48 +00:00
Michael Koziarski
c1bdf027d8
Add missing require
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7670 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-28 16:48:59 +00:00
Rick Olson
5edc81dcc2
Allow ability to disable request forgery protection, disable it in test mode by default. Closes #9693 [lifofifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-28 15:55:45 +00:00
David Heinemeier Hansson
e3b49c052b
Fixed spelling errors ( closes #9706 ) [tarmo/rmm5t]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7666 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-28 14:18:47 +00:00
David Heinemeier Hansson
3c695356ae
Fixed the layout defaults ( closes #9564 ) [lifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-28 01:23:20 +00:00
Jeremy Kemper
f08da31a4f
Move Railties' Dispatcher to ActionController::Dispatcher, introduce before_ and after_dispatch callbacks, and warm up to non-CGI requests.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7640 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-26 01:24:07 +00:00
David Heinemeier Hansson
82c1fed89f
Protect button_to behind protect_from_forgery ( closes #9675 ) [lifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7636 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-25 16:50:35 +00:00
David Heinemeier Hansson
7ca53e1d31
Added another failing test
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7632 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-25 16:37:43 +00:00
David Heinemeier Hansson
06dd4b3166
Better failing tests
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7630 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-25 15:09:21 +00:00
David Heinemeier Hansson
55a9c86e62
Added failing tests for iphone
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7629 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-25 14:57:15 +00:00
David Heinemeier Hansson
501244fee4
Updated iphone_with_html_response_type to fail as it uses the new register_alias approach
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7625 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-24 23:44:36 +00:00
David Heinemeier Hansson
bdf5672077
Change from InvalidToken to InvalidAuthenticityToken to be more specific
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7623 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-24 23:12:25 +00:00
Jeremy Kemper
cb5b8a7f05
Optimized named routes respect AbstractRequest.relative_url_root. Closes #9612 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7605 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-23 22:52:57 +00:00
Jeremy Kemper
6580b3ab00
Remove , and ; (comma and semicolon) from routing separators again. References #8558 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7599 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-23 21:58:02 +00:00
David Heinemeier Hansson
7d9fe04b1d
Fixed cache_page to use the request url instead of the routing options when picking a save path ( closes #8614 ) [josh]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7598 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-23 21:56:52 +00:00
Jeremy Kemper
a6f49d9b78
Introduce ActionController::Base.rescue_from to declare exception-handling methods. Cleaner style than the case-heavy rescue_action_in_public. Closes #9449 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7597 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-23 21:56:22 +00:00
Rick Olson
c619003854
Rename some RequestForgeryProtection methods. The class method is now #protect_from_forgery, and the default parameter is now 'authenticity_token'. [Rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-23 18:14:44 +00:00
Rick Olson
4e3ed5bc44
Merge csrf_killer plugin into rails. Adds RequestForgeryProtection model that verifies session-specific _tokens for non-GET requests. [Rick]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7592 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-23 02:32:55 +00:00
Michael Koziarski
7573791284
Disable the routing optimisation code when dealing with foo_url helpers. Add test to actionmailer to expose the problem they introduced. References #9450 [Koz]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7572 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-22 19:20:06 +00:00
Jeremy Kemper
28f7de07cb
Test CGI::Cookie#to_s. Closes #9624 [tarmo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7535 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-22 09:01:33 +00:00
Michael Koziarski
9b468f4cd7
[html-scanner] Fix parsing of empty tags. Closes #7641 . [anthony.bailey]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7528 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-21 20:45:49 +00:00
David Heinemeier Hansson
eede82ccb9
Added support for HTTP Only cookies (works in IE6+ and FF 2.0.5+) as an improvement for XSS attacks ( closes #8895 ) [lifo/Spakman]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7525 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-21 15:05:49 +00:00
David Heinemeier Hansson
4156497602
Fixed CaptureHelper#content_for to work with the optional content parameter instead of just the block #9434 [sandofsky/wildchild]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7522 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-21 03:40:25 +00:00
David Heinemeier Hansson
0d99423727
Fixed that default layouts did not take the format into account #9564 [lifofifo]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7514 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-18 23:10:34 +00:00
Michael Koziarski
7cb26b5d2d
Disable optimisation code for UrlWriter as request.host doesn't make sense there.
...
Don't try to use the .to_query method when the route has no dynamic segments.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7501 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-17 09:30:18 +00:00
Jeremy Kemper
148202d401
Fixed optimized route segment escaping. Closes #9562 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7487 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-15 22:10:20 +00:00
Jeremy Kemper
494d2c631b
root_path returns '/' not ''. Closes #9563 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7482 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-15 20:38:39 +00:00
David Heinemeier Hansson
d48039cefb
Fixed that setting request.format would also affect respond_to blocks [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7479 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-15 04:18:32 +00:00
Jeremy Kemper
c87206cc57
Add option to force binary mode on tempfile used for fixture_file_upload. Closes #6380 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7478 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-14 07:34:45 +00:00