actionpack 8.1.3.1 → 8.1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +211 -0
  3. data/lib/action_controller/metal/http_authentication.rb +1 -1
  4. data/lib/action_controller/metal/live.rb +31 -19
  5. data/lib/action_controller/metal/redirecting.rb +2 -1
  6. data/lib/action_controller/metal/rendering.rb +9 -2
  7. data/lib/action_controller/metal/strong_parameters.rb +17 -9
  8. data/lib/action_controller/railtie.rb +3 -1
  9. data/lib/action_dispatch/http/cache.rb +5 -1
  10. data/lib/action_dispatch/http/mime_negotiation.rb +11 -1
  11. data/lib/action_dispatch/http/permissions_policy.rb +2 -1
  12. data/lib/action_dispatch/http/response.rb +2 -1
  13. data/lib/action_dispatch/http/url.rb +2 -2
  14. data/lib/action_dispatch/journey/formatter.rb +5 -0
  15. data/lib/action_dispatch/journey/router/utils.rb +1 -1
  16. data/lib/action_dispatch/middleware/cookies.rb +16 -1
  17. data/lib/action_dispatch/middleware/exception_wrapper.rb +1 -1
  18. data/lib/action_dispatch/middleware/host_authorization.rb +3 -2
  19. data/lib/action_dispatch/middleware/remote_ip.rb +52 -21
  20. data/lib/action_dispatch/middleware/session/abstract_store.rb +5 -0
  21. data/lib/action_dispatch/middleware/session/cache_store.rb +27 -4
  22. data/lib/action_dispatch/middleware/session/cookie_store.rb +0 -3
  23. data/lib/action_dispatch/middleware/templates/rescues/layout.erb +2 -2
  24. data/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb +6 -8
  25. data/lib/action_dispatch/middleware/templates/rescues/routing_error.text.erb +1 -1
  26. data/lib/action_dispatch/routing/mapper.rb +6 -6
  27. data/lib/action_dispatch/system_testing/browser.rb +3 -1
  28. data/lib/action_dispatch/testing/test_helpers/page_dump_helper.rb +1 -1
  29. data/lib/action_pack/gem_version.rb +1 -1
  30. metadata +11 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b0ff49056ea3c453a5170155101b42a63b72fc925700963edd6e35b389be3be
4
- data.tar.gz: bd670c091cfafca4e009546d4c033ddf888d514ac7d8c4943260f0dd271a966e
3
+ metadata.gz: b25f91effbacce23d46488213ff6dc4e2d652894ee983905b167f3ae1d6908fb
4
+ data.tar.gz: f59e9e73d8ffdce6011e0e25c07cc660c9bf448b73a093899dd24a6f542a1b56
5
5
  SHA512:
6
- metadata.gz: bbfafbfe0e65589d3059d85a4a6ff62f3cf87f60c7b908b79db86a584268f04db86305addf572b6366aea58d4cb86cc5cbd762f867a1d8e6a80599d3df4657b3
7
- data.tar.gz: 30e91ed3ba2adaa8fd9cb451794c20964090382028f24ed933f821fa05b2d408af8df466b25b16c6bbdfd367e38d8400ef0547311c8da8e3ec535928b76205f7
6
+ metadata.gz: 26f0934c47f534dbf4739421b6661264a0d13d13d4e6cec16c3bf55708911cd146ff9b0ab07db125623367032e9ec68be4837d22982c1fc30c0d3f71af9d33e8
7
+ data.tar.gz: df92e22c98d46954a0064e3b62affa5b632f384a70ee00f750c45d375b61a553e95c859734fb9fd601bf35fe6b67247fade376d6a9dea355d133bd03b22082b4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,214 @@
1
+ ## Rails 8.1.4.1 (November 03, 2026) ##
2
+
3
+ * Apply `config.action_dispatch.cookies_same_site_protection` to every session
4
+ store.
5
+
6
+ `ActionDispatch::Session::CacheStore`, `MemCacheStore` and third-party
7
+ stores built on `AbstractStore` or the session mixins sent session cookies
8
+ with no `SameSite` attribute. Only `CookieStore` applied the configured
9
+ default.
10
+
11
+ [GHSA-gmj8-hvj3-49mw]
12
+
13
+ *Jean Boussier*
14
+
15
+ * Prevent `ActionController::Live` streams from blocking when a full buffer is
16
+ closed or aborted.
17
+
18
+ [GHSA-rwvh-fw6r-pwvp]
19
+
20
+ *Jeremy Daer*
21
+
22
+ * Set and extend the `Vary` header for rendered responses according to the
23
+ request headers used in format negotiation.
24
+
25
+ `Vary: Accept` was only added when the request carried a usable `Accept`
26
+ header. A response to a request without one, negotiated to HTML or
27
+ JavaScript, could be stored by a shared cache and served to later clients
28
+ that requested a different representation.
29
+
30
+ Responses now vary on `Accept` and `X-Requested-With` whenever the format is
31
+ not given by the URL. XHR requests without `Accept` also vary on
32
+ `Content-Type`, which Rails uses as a legacy format fallback. When
33
+ `config.action_dispatch.ignore_accept_header` is enabled, responses vary
34
+ only on `X-Requested-With`.
35
+
36
+ These fields are appended to an existing `Vary` value without duplicating
37
+ fields case-insensitively. `Vary: *` remains unchanged.
38
+
39
+ [GHSA-r9jg-fmfx-2gv6]
40
+
41
+ *Jeremy Daer*
42
+
43
+ * Skip writing a `CacheStore` session that another request deleted while this
44
+ one ran.
45
+
46
+ A request that loaded a session from `ActionDispatch::Session::CacheStore`
47
+ wrote it back when it finished, even after a concurrent `reset_session` or a
48
+ server-side delete had removed it, so the old session ID worked again.
49
+
50
+ [GHSA-2586-8ghr-69fj]
51
+
52
+ *Mike Dalessio*
53
+
54
+ * Don't write upgraded cookies to a response that skips the session.
55
+
56
+ Reading a signed or encrypted cookie written under a rotated secret, or in
57
+ the format a `:hybrid` serializer migrates from, writes it back in the
58
+ current format. That write ignored `request.session_options[:skip]`, so a
59
+ response that skips the session, such as the Active Storage proxy's
60
+ public, cacheable response, could still carry the session cookie in
61
+ `Set-Cookie`. Such a response now leaves the cookie unchanged, and a later
62
+ request that does not skip the session upgrades it. An application that
63
+ skips the session on every request no longer upgrades its signed or
64
+ encrypted cookies. Cookies the application sets are still written.
65
+
66
+ [GHSA-x6mj-8jx9-qhqv]
67
+
68
+ *Mike Dalessio*
69
+
70
+ * Detect conflicts between the `Forwarded` and `X-Forwarded-For` headers in
71
+ `ActionDispatch::RemoteIp`.
72
+
73
+ When `ip_spoofing_check` is enabled (the default), requests carrying both
74
+ headers with conflicting client addresses now raise
75
+ `ActionDispatch::RemoteIp::IpSpoofAttackError`.
76
+
77
+ [GHSA-2gff-2mmg-m73p]
78
+
79
+ *Gannon McGibbon*, *Mike Dalessio*
80
+
81
+ * `ActionController::Parameters#each_key` returns `self` when given a block.
82
+
83
+ It returned the internal `ActiveSupport::HashWithIndifferentAccess`, which
84
+ does not respond to `permitted?`, so passing that return value to mass
85
+ assignment skipped the Strong Parameters check. `each`, `each_pair` and
86
+ `each_value` already return `self`.
87
+
88
+ Document that `ActionController::Parameters#as_json` returns every
89
+ parameter, permitted or not, in a hash that mass assignment does not check.
90
+
91
+ [GHSA-wm3x-v3qw-4jh3]
92
+
93
+ *Mike Dalessio*
94
+
95
+ ## Rails 8.1.4 (September 24, 2026) ##
96
+
97
+ * Fix the debug error page to not attempt to read source fragments from
98
+ directory paths.
99
+
100
+ *Marco Roth*
101
+
102
+ * Apply source value mappings to dynamic Permissions Policy sources.
103
+
104
+ Dynamic Permissions Policy sources (procs) now have source mappings applied
105
+ to their resolved values, the same as static sources.
106
+
107
+ *Kenta Ishizaki*
108
+
109
+ * Allow `ActionDispatch::Http::URL.path_for` with `trailing_slash: true` and a
110
+ blank path to accept query params and an anchor.
111
+
112
+ Previously the blank path used a frozen `"/"`, which raised a `FrozenError`
113
+ when appending the query string.
114
+
115
+ *Kenta Ishizaki*
116
+
117
+ * Avoid mutating the `params` hash passed to `ActionDispatch::Http::URL.url_for`.
118
+
119
+ *Kenta Ishizaki*
120
+
121
+ * Honor falsy values (e.g. `format: false`, `anchor: false`) passed in the
122
+ deprecated positional-hash form of routing DSL methods.
123
+
124
+ Previously, `false` values were silently dropped without emitting a
125
+ deprecation warning, causing the deprecated hash form to produce different
126
+ routes than the keyword form.
127
+
128
+ *Kenta Ishizaki*
129
+
130
+ * Honor the deprecated `namespace` hash `:path`, `:shallow_path`, and
131
+ `:shallow_prefix` options when passed as `false`.
132
+
133
+ *Kenta Ishizaki*
134
+
135
+ * Fix the deprecated `scope` hash `:except` option to apply to `except`
136
+ instead of `only`.
137
+
138
+ *Kenta Ishizaki*
139
+
140
+ * Reject malformed hosts with extra ports in `ActionDispatch::HostAuthorization`.
141
+
142
+ When an allowed host is configured with an explicit port, a `Host` header
143
+ with an additional port (e.g. `www.example.com:80:80`) is no longer accepted.
144
+
145
+ *Andrii Furmanets*
146
+
147
+ * Fix `url_for` to leave out an optional part of a route when its value is a
148
+ blank string, the same way it already does for `nil`.
149
+
150
+ Before, the blank string ended up in the path, producing a URL the route
151
+ itself cannot match:
152
+
153
+ ```ruby
154
+ get "(/locale/:locale)/products(/:id)", to: "products#show"
155
+
156
+ url_for(controller: "products", action: "show", locale: "", id: 123)
157
+ # Before: "/locale//products/123"
158
+ # After: "/products/123"
159
+ ```
160
+
161
+ Blank strings for required parameters behave as before.
162
+
163
+ *Carl Dawson*
164
+
165
+ * Fix path normalization to handle mixed-case percent-encoding.
166
+
167
+ *Andrii Furmanets*
168
+
169
+ * Avoid loading `ActionController::Live` early in initializer, and introduce
170
+ `action_controller_live` load hook.
171
+
172
+ *Adrianna Chang*
173
+
174
+ * Set the browser binary when preloading the Selenium driver for system tests.
175
+
176
+ Selenium 4.45 stopped setting it as a side effect of getting the driver path,
177
+ causing tests to fail with "cannot find Chrome binary".
178
+
179
+ *Titus Fortner*
180
+
181
+ * Fix `Session::CacheStore` to not generate a new session after dropping the current one.
182
+
183
+ *Kenta Ishizaki*
184
+
185
+ * Parse all three HTTP-date formats in the `If-Modified-Since` request header.
186
+
187
+ `If-Modified-Since` carries an HTTP-date, which RFC 9110 allows in any of
188
+ three formats (IMF-fixdate, RFC 850, or asctime), and requires recipients to
189
+ accept all three. The header was parsed with `Time.rfc2822`, which only
190
+ accepts the IMF-fixdate format, and the parse failure was swallowed — so a
191
+ conditional `GET` using an RFC 850 or asctime date silently failed to produce
192
+ a `304 Not Modified` and re-sent the full response. It is now parsed with
193
+ `Time.httpdate`, consistent with how `Last-Modified` and `Date` are read.
194
+
195
+ *Kenta Ishizaki*
196
+
197
+ * Fix response steam buffers compatibility with `IO.copy_stream`.
198
+
199
+ `IO.copy_stream(src, response.stream)` raised `TypeError: no implicit
200
+ conversion of Array into Integer` because `Buffer#write` returned the
201
+ buffer array instead of an Integer (bytes written). Additionally, the
202
+ written data could be silently corrupted because `IO.copy_stream`
203
+ reuses its internal string buffer after `write` returns — storing a
204
+ reference without `dup` meant the buffered content was later mutated.
205
+
206
+ Both `ActionDispatch::Response::Buffer#write` and
207
+ `ActionController::Live::Buffer#write` are affected.
208
+
209
+ *Gabriel Quaresma*
210
+
211
+
1
212
  ## Rails 8.1.3.1 (July 29, 2026) ##
2
213
 
3
214
  * No changes.
@@ -514,7 +514,7 @@ module ActionController
514
514
  end
515
515
 
516
516
  # This method takes an authorization body and splits up the key-value pairs by
517
- # the standardized `:`, `;`, or `\t` delimiters defined in
517
+ # the standardized `,`, `;`, or `\t` delimiters defined in
518
518
  # `AUTHN_PAIR_DELIMITERS`.
519
519
  def raw_params(auth)
520
520
  _raw_params = auth.sub(TOKEN_REGEX, "").split(AUTHN_PAIR_DELIMITERS).map(&:strip)
@@ -27,7 +27,7 @@ module ActionController
27
27
  # end
28
28
  #
29
29
  # There are a few caveats with this module. You **cannot** write headers after
30
- # the response has been committed (Response#committed? will return truthy).
30
+ # the response has been committed (`Response#committed?` will return truthy).
31
31
  # Calling `write` or `close` on the response stream will cause the response
32
32
  # object to be committed. Make sure all headers are set before calling write or
33
33
  # close on your stream.
@@ -50,7 +50,8 @@ module ActionController
50
50
  #
51
51
  # def stream
52
52
  # response.headers["Content-Type"] = "text/event-stream"
53
- # response.headers["Last-Modified"] = Time.now.httpdate # Add this line if your Rack version is 2.2.x
53
+ # # Add this line if your Rack version is 2.2.x
54
+ # response.headers["Last-Modified"] = Time.now.httpdate
54
55
  # ...
55
56
  # end
56
57
  #
@@ -62,26 +63,27 @@ module ActionController
62
63
  # You can configure which execution state keys should be excluded from being shared
63
64
  # using the `config.action_controller.live_streaming_excluded_keys` configuration:
64
65
  #
65
- # # config/application.rb
66
- # config.action_controller.live_streaming_excluded_keys = [:active_record_connected_to_stack]
66
+ # # config/application.rb
67
+ # config.action_controller.live_streaming_excluded_keys =
68
+ # [:active_record_connected_to_stack]
67
69
  #
68
70
  # This is useful when using ActionController::Live inside a `connected_to` block. For example,
69
71
  # if the parent request is reading from a replica using `connected_to(role: :reading)`, you may
70
72
  # want the streaming thread to use its own connection context instead of inheriting the read-only
71
73
  # context:
72
74
  #
73
- # # Without configuration, streaming thread inherits read-only connection
74
- # ActiveRecord::Base.connected_to(role: :reading) do
75
- # @posts = Post.all
76
- # render stream: true # Streaming thread cannot write to database
77
- # end
75
+ # # Without configuration, streaming thread inherits read-only connection
76
+ # ActiveRecord::Base.connected_to(role: :reading) do
77
+ # @posts = Post.all
78
+ # render stream: true # Streaming thread cannot write to database
79
+ # end
78
80
  #
79
- # # With configuration, streaming thread gets fresh connection context
80
- # # config.action_controller.live_streaming_excluded_keys = [:active_record_connected_to_stack]
81
- # ActiveRecord::Base.connected_to(role: :reading) do
82
- # @posts = Post.all
83
- # render stream: true # Streaming thread can write to database if needed
84
- # end
81
+ # # With configuration, streaming thread gets fresh connection context
82
+ # # config.action_controller.live_streaming_excluded_keys = [:active_record_connected_to_stack]
83
+ # ActiveRecord::Base.connected_to(role: :reading) do
84
+ # @posts = Post.all
85
+ # render stream: true # Streaming thread can write to database if needed
86
+ # end
85
87
  #
86
88
  # Common keys you might want to exclude:
87
89
  # - `:active_record_connected_to_stack` - Database connection routing and roles
@@ -219,7 +221,11 @@ module ActionController
219
221
  @response.delete_header "Content-Length"
220
222
  end
221
223
 
222
- super
224
+ begin
225
+ super
226
+ rescue ClosedQueueError
227
+ raise IOError, "closed stream" if connected?
228
+ end
223
229
 
224
230
  unless connected?
225
231
  @buf.clear
@@ -230,6 +236,8 @@ module ActionController
230
236
  raise ClientDisconnected, "client disconnected"
231
237
  end
232
238
  end
239
+
240
+ string.bytesize
233
241
  end
234
242
 
235
243
  # Same as `write` but automatically include a newline at the end of the string.
@@ -237,14 +245,14 @@ module ActionController
237
245
  write string.end_with?("\n") ? string : "#{string}\n"
238
246
  end
239
247
 
240
- # Write a 'close' event to the buffer; the producer/writing thread uses this to
241
- # notify us that it's finished supplying content.
248
+ # Close the buffer; the producer/writing thread uses this to notify us that
249
+ # it's finished supplying content.
242
250
  #
243
251
  # See also #abort.
244
252
  def close
245
253
  synchronize do
246
254
  super
247
- @buf.push nil
255
+ @buf.close
248
256
  @cv.broadcast
249
257
  end
250
258
  end
@@ -256,7 +264,9 @@ module ActionController
256
264
  def abort
257
265
  synchronize do
258
266
  @aborted = true
267
+ @buf.close
259
268
  @buf.clear
269
+ @cv.broadcast
260
270
  end
261
271
  end
262
272
 
@@ -429,5 +439,7 @@ module ActionController
429
439
  "#{message}\n\n"
430
440
  end
431
441
  end
442
+
443
+ ActiveSupport.run_load_hooks(:action_controller_live, self)
432
444
  end
433
445
  end
@@ -241,7 +241,8 @@ module ActionController
241
241
  # url_from("http://example.com/profile") # => "http://example.com/profile"
242
242
  # url_from("http://evil.com/profile") # => nil
243
243
  #
244
- # Subdomains are considered part of the host:
244
+ # Subdomains are included when comparing hosts. The hostname must match exactly
245
+ # for a redirect to be considered internal.
245
246
  #
246
247
  # # If request.host is on https://example.com or https://app.example.com, you'd get:
247
248
  # url_from("https://dev.example.com/profile") # => nil
@@ -224,8 +224,15 @@ module ActionController
224
224
  end
225
225
 
226
226
  def _set_vary_header
227
- if response.headers["Vary"].blank? && request.should_apply_vary_header?
228
- response.headers["Vary"] = "Accept"
227
+ if request.should_apply_vary_header?
228
+ vary_headers = response.headers["Vary"].to_s.split(",").map(&:strip).reject(&:blank?)
229
+
230
+ unless vary_headers.include?("*")
231
+ request.vary_headers.each do |header|
232
+ vary_headers << header unless vary_headers.any? { |existing| existing.casecmp?(header) }
233
+ end
234
+ response.headers["Vary"] = vary_headers.join(", ")
235
+ end
229
236
  end
230
237
  end
231
238
 
@@ -145,7 +145,7 @@ module ActionController
145
145
  #
146
146
  # params = ActionController::Parameters.new(a: "123", b: "456")
147
147
  # params.permit(:c)
148
- # # => ActionController::UnpermittedParameters: found unpermitted keys: a, b
148
+ # # => ActionController::UnpermittedParameters: found unpermitted parameters: :a, :b
149
149
  #
150
150
  # Please note that these options *are not thread-safe*. In a multi-threaded
151
151
  # environment they should only be set once at boot-time and never mutated at
@@ -197,15 +197,14 @@ module ActionController
197
197
  # as_json(options=nil)
198
198
  #
199
199
  # Returns a hash that can be used as the JSON representation for the parameters.
200
-
201
- ##
202
- # :method: each_key
203
200
  #
204
- # :call-seq:
205
- # each_key(&block)
201
+ # Like `#to_unsafe_h`, the hash holds every parameter, permitted or not, and
202
+ # mass assignment does not check it. Do not pass it to a model.
206
203
  #
207
- # Calls block once for each key in the parameters, passing the key. If no block
208
- # is given, an enumerator is returned instead.
204
+ # params = ActionController::Parameters.new(name: "Bob", admin: true)
205
+ # params.as_json # => {"name" => "Bob", "admin" => true}
206
+ # User.new(params) # => ActiveModel::ForbiddenAttributesError
207
+ # User.new(params.as_json) # => #<User name: "Bob", admin: true>
209
208
 
210
209
  ##
211
210
  # :method: empty?
@@ -248,7 +247,7 @@ module ActionController
248
247
  # Returns the content of the parameters as a string.
249
248
 
250
249
  delegate :keys, :empty?, :exclude?, :include?,
251
- :as_json, :to_s, :each_key, to: :@parameters
250
+ :as_json, :to_s, to: :@parameters
252
251
 
253
252
  alias_method :has_key?, :include?
254
253
  alias_method :key?, :include?
@@ -420,6 +419,15 @@ module ActionController
420
419
  self
421
420
  end
422
421
 
422
+ # Calls block once for each key in the parameters, passing the key. If no block
423
+ # is given, an enumerator is returned instead.
424
+ def each_key(&block)
425
+ return to_enum(:each_key) unless block_given?
426
+ @parameters.each_key(&block)
427
+
428
+ self
429
+ end
430
+
423
431
  # Returns a new array of the values of the parameters.
424
432
  def values
425
433
  to_enum(:each_value).to_a
@@ -34,7 +34,9 @@ module ActionController
34
34
  end
35
35
 
36
36
  initializer "action_controller.live_streaming_excluded_keys" do |app|
37
- ActionController::Live.live_streaming_excluded_keys = app.config.action_controller.live_streaming_excluded_keys
37
+ ActiveSupport.on_load(:action_controller_live) do
38
+ ActionController::Live.live_streaming_excluded_keys = app.config.action_controller.live_streaming_excluded_keys
39
+ end
38
40
  end
39
41
 
40
42
  initializer "action_controller.parameters_config" do |app|
@@ -13,7 +13,11 @@ module ActionDispatch
13
13
 
14
14
  def if_modified_since
15
15
  if since = get_header(HTTP_IF_MODIFIED_SINCE)
16
- Time.rfc2822(since) rescue nil
16
+ # `If-Modified-Since` carries an HTTP-date, which per RFC 9110 may be in
17
+ # any of the three legal formats (IMF-fixdate, RFC 850, or asctime).
18
+ # `Time.httpdate` accepts all three; it also matches how the response side
19
+ # parses `Last-Modified`/`Date`. `Time.rfc2822` only accepted IMF-fixdate.
20
+ Time.httpdate(since) rescue nil
17
21
  end
18
22
  end
19
23
 
@@ -212,7 +212,17 @@ module ActionDispatch
212
212
  end
213
213
 
214
214
  def should_apply_vary_header?
215
- !params_readable? && use_accept_header && valid_accept_header
215
+ !params_readable?
216
+ end
217
+
218
+ def vary_headers # :nodoc:
219
+ if use_accept_header
220
+ headers = ["Accept", "X-Requested-With"]
221
+ headers.insert(1, "Content-Type") if xhr? && accept.blank?
222
+ headers
223
+ else
224
+ ["X-Requested-With"]
225
+ end
216
226
  end
217
227
 
218
228
  private
@@ -179,7 +179,8 @@ module ActionDispatch # :nodoc:
179
179
  if context.nil?
180
180
  raise RuntimeError, "Missing context for the dynamic permissions policy source: #{source.inspect}"
181
181
  else
182
- context.instance_exec(&source)
182
+ resolved = context.instance_exec(&source)
183
+ apply_mappings(Array.wrap(resolved))
183
184
  end
184
185
  else
185
186
  raise RuntimeError, "Unexpected permissions policy source: #{source.inspect}"
@@ -150,7 +150,8 @@ module ActionDispatch # :nodoc:
150
150
 
151
151
  @str_body = nil
152
152
  @response.commit!
153
- @buf.push string
153
+ @buf.push string.frozen? ? string : string.dup
154
+ string.bytesize
154
155
  end
155
156
  alias_method :<<, :write
156
157
 
@@ -170,7 +170,7 @@ module ActionDispatch
170
170
  path = options[:script_name].to_s.chomp("/")
171
171
  path << options[:path] if options.key?(:path)
172
172
 
173
- path = "/" if options[:trailing_slash] && path.blank?
173
+ path = +"/" if options[:trailing_slash] && path.blank?
174
174
 
175
175
  add_params(path, options[:params]) if options.key?(:params)
176
176
  add_anchor(path, options[:anchor]) if options.key?(:anchor)
@@ -181,7 +181,7 @@ module ActionDispatch
181
181
  private
182
182
  def add_params(path, params)
183
183
  params = { params: params } unless params.is_a?(Hash)
184
- params.reject! { |_, v| v.to_param.nil? }
184
+ params = params.reject { |_, v| v.to_param.nil? }
185
185
  query = params.to_query
186
186
  path << "?#{query}" unless query.empty?
187
187
  end
@@ -90,6 +90,11 @@ module ActionDispatch
90
90
  defaults = route.defaults
91
91
  required_parts = route.required_parts
92
92
 
93
+ # After query param extraction, so empty values are consumed as path parts.
94
+ parameterized_parts.delete_if do |key, value|
95
+ value.to_s.blank? && !required_parts.include?(key)
96
+ end
97
+
93
98
  route.parts.reverse_each do |key|
94
99
  break if defaults[key].nil? && parameterized_parts[key].present?
95
100
  next if parameterized_parts[key].to_s != defaults[key].to_s
@@ -31,7 +31,7 @@ module ActionDispatch
31
31
 
32
32
  unless path == "/"
33
33
  path.delete_suffix!("/")
34
- path.gsub!(/(%[a-f0-9]{2})/) { $1.upcase }
34
+ path.gsub!(/(%[a-f0-9]{2})/i) { $1.upcase }
35
35
  end
36
36
 
37
37
  path.force_encoding(encoding)
@@ -324,6 +324,7 @@ module ActionDispatch
324
324
  def initialize(request)
325
325
  @set_cookies = {}
326
326
  @delete_cookies = {}
327
+ @upgraded_cookies = Set.new
327
328
  @request = request
328
329
  @cookies = {}
329
330
  @committed = false
@@ -386,6 +387,7 @@ module ActionDispatch
386
387
  end
387
388
 
388
389
  handle_options(options)
390
+ @upgraded_cookies.delete(name.to_s)
389
391
 
390
392
  if @cookies[name.to_s] != value || options[:expires]
391
393
  @cookies[name.to_s] = value
@@ -426,8 +428,14 @@ module ActionDispatch
426
428
  @cookies.each_key { |k| delete(k, options) }
427
429
  end
428
430
 
431
+ def upgraded(name)
432
+ @upgraded_cookies << name.to_s
433
+ end
434
+
429
435
  def write(response)
430
436
  @set_cookies.each do |name, value|
437
+ next if @upgraded_cookies.include?(name) && request.session_options[:skip]
438
+
431
439
  if write_cookie?(value)
432
440
  response.set_cookie(name, value)
433
441
  end
@@ -533,6 +541,10 @@ module ActionDispatch
533
541
  @parent_jar[name] = options
534
542
  end
535
543
 
544
+ def upgraded(name)
545
+ @parent_jar.upgraded(name)
546
+ end
547
+
536
548
  protected
537
549
  def request; @parent_jar.request; end
538
550
 
@@ -599,7 +611,10 @@ module ActionDispatch
599
611
  return
600
612
  end
601
613
 
602
- self[name] = { value: value } if force_reserialize || reserialize?(dumped)
614
+ if force_reserialize || reserialize?(dumped)
615
+ self[name] = { value: value }
616
+ upgraded(name)
617
+ end
603
618
 
604
619
  value
605
620
  end
@@ -336,7 +336,7 @@ module ActionDispatch
336
336
  def source_fragment(path, line)
337
337
  return unless Rails.respond_to?(:root) && Rails.root
338
338
  full_path = Rails.root.join(path)
339
- if File.exist?(full_path)
339
+ if File.file?(full_path)
340
340
  File.open(full_path, "r") do |file|
341
341
  extract_source_fragment_lines(file.each_line, line)
342
342
  end
@@ -73,10 +73,11 @@ module ActionDispatch
73
73
  end
74
74
 
75
75
  def sanitize_string(host)
76
+ port = "#{PORT_REGEX}?" unless host.match?(/:\d+\z/)
76
77
  if host.start_with?(".")
77
- /\A#{SUBDOMAIN_REGEX}?#{Regexp.escape(host[1..-1])}#{PORT_REGEX}?\z/i
78
+ /\A#{SUBDOMAIN_REGEX}?#{Regexp.escape(host[1..-1])}#{port}\z/i
78
79
  else
79
- /\A#{Regexp.escape host}#{PORT_REGEX}?\z/i
80
+ /\A#{Regexp.escape host}#{port}\z/i
80
81
  end
81
82
  end
82
83
 
@@ -26,10 +26,10 @@ module ActionDispatch
26
26
  # middleware assumes that there is at least one proxy sitting around and setting
27
27
  # headers with the client's remote IP address. If you don't use a proxy, because
28
28
  # you are hosted on e.g. Heroku without SSL, any client can claim to have any IP
29
- # address by setting the `X-Forwarded-For` header. If you care about that, then
30
- # you need to explicitly drop or ignore those headers sometime before this
31
- # middleware runs. Alternatively, remove this middleware to avoid inadvertently
32
- # relying on it.
29
+ # address by setting the `Forwarded` or `X-Forwarded-For` header. If you care
30
+ # about that, then you need to explicitly drop or ignore those headers sometime
31
+ # before this middleware runs. Alternatively, remove this middleware to avoid
32
+ # inadvertently relying on it.
33
33
  class RemoteIp
34
34
  class IpSpoofAttackError < StandardError; end
35
35
 
@@ -53,10 +53,11 @@ module ActionDispatch
53
53
  # Create a new `RemoteIp` middleware instance.
54
54
  #
55
55
  # The `ip_spoofing_check` option is on by default. When on, an exception is
56
- # raised if it looks like the client is trying to lie about its own IP address.
57
- # It makes sense to turn off this check on sites aimed at non-IP clients (like
58
- # WAP devices), or behind proxies that set headers in an incorrect or confusing
59
- # way (like AWS ELB).
56
+ # raised if it looks like the client is trying to lie about its own IP address,
57
+ # such as when the request carries conflicting `Forwarded`, `X-Forwarded-For`,
58
+ # or `Client-Ip` headers. It makes sense to turn off this check on sites aimed
59
+ # at non-IP clients (like WAP devices), or behind proxies that set headers in
60
+ # an incorrect or confusing way (like AWS ELB).
60
61
  #
61
62
  # The `custom_proxies` argument can take an enumerable which will be used
62
63
  # instead of `TRUSTED_PROXIES`. Any proxy setup will put the value you want in
@@ -102,6 +103,14 @@ module ActionDispatch
102
103
  # an actual IP address. If the ActionDispatch::Request#remote_ip method is
103
104
  # called, this class will calculate the value and then memoize it.
104
105
  class GetIp
106
+ # Parses X-Forwarded-For as Rack does, whatever `Rack::Request.forwarded_priority` says.
107
+ class XForwardedForParser < Rack::Request # :nodoc:
108
+ private
109
+ def forwarded_priority
110
+ [:x_forwarded]
111
+ end
112
+ end
113
+
105
114
  def initialize(req, check_ip, proxies)
106
115
  @req = req
107
116
  @check_ip = check_ip
@@ -134,27 +143,20 @@ module ActionDispatch
134
143
  client_ips = sanitize_ips(ips_from(@req.client_ip)).reverse!
135
144
  forwarded_ips = sanitize_ips(@req.forwarded_for || []).reverse!
136
145
 
137
- # `Client-Ip` and `X-Forwarded-For` should not, generally, both be set. If they
138
- # are both set, it means that either:
146
+ # `Client-Ip`, `Forwarded`, and `X-Forwarded-For` should not, generally, all
147
+ # be set. If several of them are set, it means that either:
139
148
  #
140
- # 1) This request passed through two proxies with incompatible IP header
149
+ # 1) This request passed through proxies with incompatible IP header
141
150
  # conventions.
142
151
  #
143
- # 2) The client passed one of `Client-Ip` or `X-Forwarded-For`
144
- # (whichever the proxy servers weren't using) themselves.
152
+ # 2) The client passed the headers the proxy servers weren't using
153
+ # themselves.
145
154
  #
146
155
  # Either way, there is no way for us to determine which header is the right one
147
156
  # after the fact. Since we have no idea, if we are concerned about IP spoofing
148
157
  # we need to give up and explode. (If you're not concerned about IP spoofing you
149
158
  # can turn the `ip_spoofing_check` option off.)
150
- should_check_ip = @check_ip && client_ips.last && forwarded_ips.last
151
- if should_check_ip && !forwarded_ips.include?(client_ips.last)
152
- # We don't know which came from the proxy, and which from the user
153
- raise IpSpoofAttackError, "IP spoofing attack?! " \
154
- "HTTP_CLIENT_IP=#{@req.client_ip.inspect} " \
155
- "HTTP_X_FORWARDED_FOR=#{@req.x_forwarded_for.inspect}" \
156
- " HTTP_FORWARDED=" + @req.forwarded_for.map { "for=#{_1}" }.join(", ").inspect if @req.forwarded_for.any?
157
- end
159
+ check_ip(client_ips, forwarded_ips) if @check_ip
158
160
 
159
161
  # We assume these things about the IP headers:
160
162
  #
@@ -182,6 +184,35 @@ module ActionDispatch
182
184
  header.strip.split(/[,\s]+/)
183
185
  end
184
186
 
187
+ def raise_spoofing_error
188
+ message = +"IP spoofing attack?! " \
189
+ "HTTP_CLIENT_IP=#{@req.client_ip.inspect} " \
190
+ "HTTP_X_FORWARDED_FOR=#{@req.x_forwarded_for.inspect}"
191
+ if forwarded = @req.get_header("HTTP_FORWARDED")
192
+ message << " HTTP_FORWARDED=#{forwarded.inspect}"
193
+ end
194
+ raise IpSpoofAttackError, message
195
+ end
196
+
197
+ def check_ip(client_ips, forwarded_ips)
198
+ if client_ips.last && forwarded_ips.last && !forwarded_ips.include?(client_ips.last)
199
+ # We don't know which came from the proxy, and which from the user
200
+ raise_spoofing_error
201
+ end
202
+
203
+ if @req.get_header("HTTP_FORWARDED") && @req.x_forwarded_for
204
+ x_forwarded_ips = XForwardedForParser.new("HTTP_X_FORWARDED_FOR" => @req.x_forwarded_for).forwarded_for || []
205
+ x_forwarded_client = filter_proxies(sanitize_ips(x_forwarded_ips).reverse!).first
206
+ forwarded_client = filter_proxies(forwarded_ips).first
207
+
208
+ # Compare strings, not parsed addresses, so the client cannot choose how its
209
+ # own address is spelled.
210
+ if x_forwarded_client && x_forwarded_client != forwarded_client
211
+ raise_spoofing_error
212
+ end
213
+ end
214
+ end
215
+
185
216
  def sanitize_ips(ips) # :doc:
186
217
  ips.select! do |ip|
187
218
  # Only return IPs that are valid according to the IPAddr#new method.
@@ -20,8 +20,13 @@ module ActionDispatch
20
20
  end
21
21
 
22
22
  module Compatibility
23
+ DEFAULT_SAME_SITE = proc { |request| request.cookies_same_site_protection } # :nodoc:
24
+
23
25
  def initialize(app, options = {})
24
26
  options[:key] ||= "_session_id"
27
+ unless options.key?(:same_site) || self.class::DEFAULT_OPTIONS.key?(:same_site)
28
+ options = options.merge(same_site: DEFAULT_SAME_SITE)
29
+ end
25
30
  super
26
31
  end
27
32
 
@@ -24,6 +24,8 @@ module ActionDispatch
24
24
  # By default, it is set to `false` to avoid additional cache write operations.
25
25
  #
26
26
  class CacheStore < AbstractSecureStore
27
+ LOADED_SESSION_ID = "action_dispatch.session.cache_store.loaded_session_id" # :nodoc:
28
+
27
29
  def initialize(app, options = {})
28
30
  @cache = options[:cache] || Rails.cache
29
31
  options[:expire_after] ||= @cache.options[:expires_in]
@@ -32,17 +34,20 @@ module ActionDispatch
32
34
  end
33
35
 
34
36
  # Get a session from the cache.
35
- def find_session(env, sid)
36
- unless sid && (session = get_session_with_fallback(sid))
37
+ def find_session(req, sid)
38
+ if sid && (session = get_session_with_fallback(sid))
39
+ req.set_header(LOADED_SESSION_ID, sid.private_id)
40
+ else
37
41
  sid, session = generate_sid, {}
38
42
  end
39
43
  [sid, session]
40
44
  end
41
45
 
42
46
  # Set a session in the cache.
43
- def write_session(env, sid, session, options)
47
+ def write_session(req, sid, session, options)
44
48
  key = cache_key(sid.private_id)
45
49
  if session
50
+ return false if destroyed_since_loaded?(req, sid)
46
51
  @cache.write(key, session, expires_in: options[:expire_after])
47
52
  else
48
53
  @cache.delete(key)
@@ -54,7 +59,7 @@ module ActionDispatch
54
59
  def delete_session(env, sid, options)
55
60
  @cache.delete(cache_key(sid.private_id))
56
61
  @cache.delete(cache_key(sid.public_id))
57
- generate_sid
62
+ generate_sid unless options[:drop]
58
63
  end
59
64
 
60
65
  private
@@ -67,6 +72,24 @@ module ActionDispatch
67
72
  @cache.read(cache_key(sid.private_id)) || @cache.read(cache_key(sid.public_id))
68
73
  end
69
74
 
75
+ # Writing back a session that another request deleted, such as on logout,
76
+ # would restore it.
77
+ def destroyed_since_loaded?(req, sid)
78
+ req.get_header(LOADED_SESSION_ID) == sid.private_id &&
79
+ !exist_in_backend?(cache_key(sid.private_id)) &&
80
+ !exist_in_backend?(cache_key(sid.public_id))
81
+ end
82
+
83
+ # The request-local cache still holds the entry this request loaded, so
84
+ # a lookup through it cannot see a delete made by another request.
85
+ def exist_in_backend?(key)
86
+ if @cache.respond_to?(:with_local_cache)
87
+ @cache.with_local_cache { @cache.exist?(key) }
88
+ else
89
+ @cache.exist?(key)
90
+ end
91
+ end
92
+
70
93
  def generate_sid
71
94
  if @check_collisions
72
95
  loop do
@@ -59,11 +59,8 @@ module ActionDispatch
59
59
  end
60
60
  end
61
61
 
62
- DEFAULT_SAME_SITE = proc { |request| request.cookies_same_site_protection } # :nodoc:
63
-
64
62
  def initialize(app, options = {})
65
63
  options[:cookie_only] = true
66
- options[:same_site] = DEFAULT_SAME_SITE if !options.key?(:same_site)
67
64
  super
68
65
  end
69
66
 
@@ -315,7 +315,7 @@
315
315
  return toggle('env_dump');
316
316
  }
317
317
  var copyAsText = function() {
318
- const text = document.getElementById("exception-message-for-copy").textContent;
318
+ const text = document.getElementById("exception-message-for-copy").value;
319
319
 
320
320
  navigator.clipboard.writeText(text).then(() => {
321
321
  const beforeText = this.innerText;
@@ -328,7 +328,7 @@
328
328
  <body>
329
329
 
330
330
  <%= yield %>
331
- <script type="text/plain" id="exception-message-for-copy"><%= @exception_message_for_copy %></script>
331
+ <textarea hidden id="exception-message-for-copy"><%= @exception_message_for_copy %></textarea>
332
332
 
333
333
  </body>
334
334
  </html>
@@ -5,14 +5,12 @@
5
5
  <main role="main" id="container">
6
6
  <h2><%= h @exception_wrapper.message %></h2>
7
7
  <% unless @exception_wrapper.failures.empty? %>
8
- <p>
9
- <h2>Failure reasons:</h2>
10
- <ol>
11
- <% @exception_wrapper.failures.each do |route, reason| %>
12
- <li><code><%= route.inspect.delete('\\') %></code> failed because <%= reason.downcase %></li>
13
- <% end %>
14
- </ol>
15
- </p>
8
+ <h2>Failure reasons:</h2>
9
+ <ol>
10
+ <% @exception_wrapper.failures.each do |route, reason| %>
11
+ <li><code><%= route.inspect.delete('\\') %></code> failed because <%= reason.downcase %></li>
12
+ <% end %>
13
+ </ol>
16
14
  <% end %>
17
15
 
18
16
  <%= render "rescues/trace", traces: @traces, trace_to_show: @trace_to_show %>
@@ -4,7 +4,7 @@ Routing Error
4
4
  <% unless @exception.failures.empty? %>
5
5
  Failure reasons:
6
6
  <% @exception.failures.each do |route, reason| %>
7
- - <%= route.inspect.delete('\\') %></code> failed because <%= reason.downcase %>
7
+ - <%= route.inspect.delete('\\') %> failed because <%= reason.downcase %>
8
8
  <% end %>
9
9
  <% end %>
10
10
 
@@ -665,11 +665,11 @@ module ActionDispatch
665
665
 
666
666
  private
667
667
  def assign_deprecated_option(deprecated_options, key, method_name)
668
- if (deprecated_value = deprecated_options.delete(key))
668
+ if deprecated_options.key?(key)
669
669
  ActionDispatch.deprecator.warn(<<~MSG.squish)
670
670
  #{method_name} received a hash argument #{key}. Please use a keyword instead. Support to hash argument will be removed in Rails 8.2.
671
671
  MSG
672
- deprecated_value
672
+ deprecated_options.delete(key)
673
673
  end
674
674
  end
675
675
 
@@ -989,7 +989,7 @@ module ActionDispatch
989
989
  def scope(*args, only: nil, except: nil, **options)
990
990
  if args.grep(Hash).any? && (deprecated_options = args.extract_options!)
991
991
  only ||= assign_deprecated_option(deprecated_options, :only, :scope)
992
- only ||= assign_deprecated_option(deprecated_options, :except, :scope)
992
+ except ||= assign_deprecated_option(deprecated_options, :except, :scope)
993
993
  assign_deprecated_options(deprecated_options, options, :scope)
994
994
  end
995
995
 
@@ -1097,9 +1097,9 @@ module ActionDispatch
1097
1097
  def namespace(name, deprecated_options = nil, as: DEFAULT, path: DEFAULT, shallow_path: DEFAULT, shallow_prefix: DEFAULT, **options, &block)
1098
1098
  if deprecated_options.is_a?(Hash)
1099
1099
  as = assign_deprecated_option(deprecated_options, :as, :namespace) if deprecated_options.key?(:as)
1100
- path ||= assign_deprecated_option(deprecated_options, :path, :namespace) if deprecated_options.key?(:path)
1101
- shallow_path ||= assign_deprecated_option(deprecated_options, :shallow_path, :namespace) if deprecated_options.key?(:shallow_path)
1102
- shallow_prefix ||= assign_deprecated_option(deprecated_options, :shallow_prefix, :namespace) if deprecated_options.key?(:shallow_prefix)
1100
+ path = assign_deprecated_option(deprecated_options, :path, :namespace) if deprecated_options.key?(:path)
1101
+ shallow_path = assign_deprecated_option(deprecated_options, :shallow_path, :namespace) if deprecated_options.key?(:shallow_path)
1102
+ shallow_prefix = assign_deprecated_option(deprecated_options, :shallow_prefix, :namespace) if deprecated_options.key?(:shallow_prefix)
1103
1103
  assign_deprecated_options(deprecated_options, options, :namespace)
1104
1104
  end
1105
1105
 
@@ -65,7 +65,9 @@ module ActionDispatch
65
65
  def resolve_driver_path(namespace)
66
66
  # The path method has been deprecated in 4.20.0
67
67
  if Gem::Version.new(::Selenium::WebDriver::VERSION) >= Gem::Version.new("4.20.0")
68
- namespace::Service.driver_path = ::Selenium::WebDriver::DriverFinder.new(options, namespace::Service.new).driver_path
68
+ driver_finder = ::Selenium::WebDriver::DriverFinder.new(options, namespace::Service.new)
69
+ namespace::Service.driver_path = driver_finder.driver_path
70
+ options.binary = driver_finder.browser_path if driver_finder.browser_path?
69
71
  else
70
72
  namespace::Service.driver_path = ::Selenium::WebDriver::DriverFinder.path(options, namespace::Service)
71
73
  end
@@ -8,7 +8,7 @@ module ActionDispatch
8
8
  # Saves the content of response body to a file and tries to open it in your browser.
9
9
  # Launchy must be present in your Gemfile for the page to open automatically.
10
10
  def save_and_open_page(path = html_dump_default_path)
11
- save_page(path).tap { |s_path| open_file(s_path) }
11
+ save_page(path).tap { |s_path| open_file(s_path) } # rubocop:disable Lint/Debugger
12
12
  end
13
13
 
14
14
  private
@@ -11,7 +11,7 @@ module ActionPack
11
11
  module VERSION
12
12
  MAJOR = 8
13
13
  MINOR = 1
14
- TINY = 3
14
+ TINY = 4
15
15
  PRE = "1"
16
16
 
17
17
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actionpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.1.3.1
4
+ version: 8.1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 8.1.3.1
18
+ version: 8.1.4.1
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 8.1.3.1
25
+ version: 8.1.4.1
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: nokogiri
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -127,28 +127,28 @@ dependencies:
127
127
  requirements:
128
128
  - - '='
129
129
  - !ruby/object:Gem::Version
130
- version: 8.1.3.1
130
+ version: 8.1.4.1
131
131
  type: :runtime
132
132
  prerelease: false
133
133
  version_requirements: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - '='
136
136
  - !ruby/object:Gem::Version
137
- version: 8.1.3.1
137
+ version: 8.1.4.1
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: activemodel
140
140
  requirement: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - '='
143
143
  - !ruby/object:Gem::Version
144
- version: 8.1.3.1
144
+ version: 8.1.4.1
145
145
  type: :development
146
146
  prerelease: false
147
147
  version_requirements: !ruby/object:Gem::Requirement
148
148
  requirements:
149
149
  - - '='
150
150
  - !ruby/object:Gem::Version
151
- version: 8.1.3.1
151
+ version: 8.1.4.1
152
152
  description: Web apps on Rails. Simple, battle-tested conventions for building and
153
153
  testing MVC web applications. Works with any Rack-compatible server.
154
154
  email: david@loudthinking.com
@@ -352,10 +352,10 @@ licenses:
352
352
  - MIT
353
353
  metadata:
354
354
  bug_tracker_uri: https://github.com/rails/rails/issues
355
- changelog_uri: https://github.com/rails/rails/blob/v8.1.3.1/actionpack/CHANGELOG.md
356
- documentation_uri: https://api.rubyonrails.org/v8.1.3.1/
355
+ changelog_uri: https://github.com/rails/rails/blob/v8.1.4.1/actionpack/CHANGELOG.md
356
+ documentation_uri: https://api.rubyonrails.org/v8.1.4.1/
357
357
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
358
- source_code_uri: https://github.com/rails/rails/tree/v8.1.3.1/actionpack
358
+ source_code_uri: https://github.com/rails/rails/tree/v8.1.4.1/actionpack
359
359
  rubygems_mfa_required: 'true'
360
360
  rdoc_options: []
361
361
  require_paths:
@@ -372,7 +372,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
372
372
  version: '0'
373
373
  requirements:
374
374
  - none
375
- rubygems_version: 4.0.16
375
+ rubygems_version: 4.0.20
376
376
  specification_version: 4
377
377
  summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
378
378
  test_files: []