railties 8.0.0.rc1 → 8.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 48dcbad64d0cf8be785e5a5a80d210e4f0c77ab14abb4b623c3631607e304c0e
4
- data.tar.gz: afe11b82be536134605bbd67230361f11d547108f3e6fc32c66462922038d9c4
3
+ metadata.gz: 8f9ae335123309d95f081a813b7383b2c9b2a5ae07de08a1231fed3fe6098f0f
4
+ data.tar.gz: 298788a77ad6b1c9cbeb484a33e494e2352e61bc23c75ca3b1c7b76c4deb40ef
5
5
  SHA512:
6
- metadata.gz: 3467d3b3d227a967abf2aae1399900f6fdccba995e139e5d5efd9ba0eaa694e60909122de013fd8670d4c757fb5d294e3b4e8c257e50632c686e1155185521cc
7
- data.tar.gz: 16972421f0101f97d3425a105507e886d5d588a48539ba6a4c32af7675281653268bd6b47df8a7370d5837b106f0a832bc35f54dcfdd1f5d12c1bb7408ba8dd1
6
+ metadata.gz: 780d46ca2607f8ba26fae821f958516ce71a2f74f14a39f3324231e49d8e2574426fbfd59517b0eb0d9059bfb06563417ac209dd92eb4ec7bf4872a870044616
7
+ data.tar.gz: 35cce2a67578153c350a8d493d95fdfb8f0fdc1b62bbe240dd0ffdd1a9daa509f49cc8fd617ac48d463afd53c97b8225b2a400d1bf27dd0c4f3070fc8a77ec89
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## Rails 8.0.0.rc2 (October 30, 2024) ##
2
+
3
+ * Fix incorrect database.yml with `skip_solid`.
4
+
5
+ *Joé Dupuis*
6
+
7
+ * Set `Regexp.timeout` to `1`s by default to improve security over Regexp Denial-of-Service attacks.
8
+
9
+ *Rafael Mendonça França*
10
+
11
+
1
12
  ## Rails 8.0.0.rc1 (October 19, 2024) ##
2
13
 
3
14
  * Remove deprecated support to extend Rails console through `Rails::ConsoleMethods`.
@@ -344,6 +344,8 @@ module Rails
344
344
  if respond_to?(:action_dispatch)
345
345
  action_dispatch.strict_freshness = true
346
346
  end
347
+
348
+ Regexp.timeout ||= 1
347
349
  else
348
350
  raise "Unknown version #{target_version.to_s.inspect}"
349
351
  end
@@ -10,7 +10,7 @@ module Rails
10
10
  MAJOR = 8
11
11
  MINOR = 0
12
12
  TINY = 0
13
- PRE = "rc1"
13
+ PRE = "rc2"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -271,7 +271,8 @@ module Rails
271
271
  active_storage: !options[:skip_active_storage],
272
272
  dev: options[:dev],
273
273
  node: using_node?,
274
- app_name: app_name
274
+ app_name: app_name,
275
+ skip_solid: options[:skip_solid]
275
276
  }
276
277
 
277
278
  Rails::Generators::DevcontainerGenerator.new([], devcontainer_options).invoke_all
@@ -23,3 +23,8 @@
23
23
  # If set to `false` both conditions need to be satisfied.
24
24
  #++
25
25
  # Rails.application.config.action_dispatch.strict_freshness = true
26
+
27
+ ###
28
+ # Set `Regexp.timeout` to `1`s by default to improve security over Regexp Denial-of-Service attacks.
29
+ #++
30
+ # Regexp.timeout = 1
@@ -19,6 +19,8 @@ module Rails
19
19
  template "app/controllers/concerns/authentication.rb"
20
20
  template "app/controllers/passwords_controller.rb"
21
21
 
22
+ template "app/channels/application_cable/connection.rb" if defined?(ActionCable::Engine)
23
+
22
24
  template "app/mailers/passwords_mailer.rb"
23
25
 
24
26
  template "app/views/passwords_mailer/reset.html.erb"
@@ -0,0 +1,16 @@
1
+ module ApplicationCable
2
+ class Connection < ActionCable::Connection::Base
3
+ identified_by :current_user
4
+
5
+ def connect
6
+ set_current_user || reject_unauthorized_connection
7
+ end
8
+
9
+ private
10
+ def set_current_user
11
+ if session = Session.find_by(id: cookies.signed[:session_id])
12
+ self.current_user = session.user
13
+ end
14
+ end
15
+ end
16
+ end
@@ -33,7 +33,7 @@ module Authentication
33
33
 
34
34
  def request_authentication
35
35
  session[:return_to_after_authenticating] = request.url
36
- redirect_to new_session_url
36
+ redirect_to new_session_path
37
37
  end
38
38
 
39
39
  def after_authentication_url
@@ -10,7 +10,7 @@ class PasswordsController < ApplicationController
10
10
  PasswordsMailer.reset(user).deliver_later
11
11
  end
12
12
 
13
- redirect_to new_session_url, notice: "Password reset instructions sent (if user with that email address exists)."
13
+ redirect_to new_session_path, notice: "Password reset instructions sent (if user with that email address exists)."
14
14
  end
15
15
 
16
16
  def edit
@@ -18,9 +18,9 @@ class PasswordsController < ApplicationController
18
18
 
19
19
  def update
20
20
  if @user.update(params.permit(:password, :password_confirmation))
21
- redirect_to new_session_url, notice: "Password has been reset."
21
+ redirect_to new_session_path, notice: "Password has been reset."
22
22
  else
23
- redirect_to edit_password_url(params[:token]), alert: "Passwords did not match."
23
+ redirect_to edit_password_path(params[:token]), alert: "Passwords did not match."
24
24
  end
25
25
  end
26
26
 
@@ -28,6 +28,6 @@ class PasswordsController < ApplicationController
28
28
  def set_user_by_token
29
29
  @user = User.find_by_password_reset_token!(params[:token])
30
30
  rescue ActiveSupport::MessageVerifier::InvalidSignature
31
- redirect_to new_password_url, alert: "Password reset link is invalid or has expired."
31
+ redirect_to new_password_path, alert: "Password reset link is invalid or has expired."
32
32
  end
33
33
  end
@@ -10,12 +10,12 @@ class SessionsController < ApplicationController
10
10
  start_new_session_for user
11
11
  redirect_to after_authentication_url
12
12
  else
13
- redirect_to new_session_url, alert: "Try another email address or password."
13
+ redirect_to new_session_path, alert: "Try another email address or password."
14
14
  end
15
15
  end
16
16
 
17
17
  def destroy
18
18
  terminate_session
19
- redirect_to new_session_url
19
+ redirect_to new_session_path
20
20
  end
21
21
  end
@@ -29,6 +29,9 @@ module Rails
29
29
  class_option :kamal, type: :boolean, default: true,
30
30
  desc: "Include configuration for Kamal"
31
31
 
32
+ class_option :skip_solid, type: :boolean, default: nil,
33
+ desc: "Skip Solid Cache & Queue setup"
34
+
32
35
  source_paths << File.expand_path(File.join(base_name, "app", "templates"), base_root)
33
36
 
34
37
  def create_devcontainer
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railties
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.0.rc1
4
+ version: 8.0.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-19 00:00:00.000000000 Z
11
+ date: 2024-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 8.0.0.rc1
19
+ version: 8.0.0.rc2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 8.0.0.rc1
26
+ version: 8.0.0.rc2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: actionpack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 8.0.0.rc1
33
+ version: 8.0.0.rc2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 8.0.0.rc1
40
+ version: 8.0.0.rc2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rackup
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -120,14 +120,14 @@ dependencies:
120
120
  requirements:
121
121
  - - '='
122
122
  - !ruby/object:Gem::Version
123
- version: 8.0.0.rc1
123
+ version: 8.0.0.rc2
124
124
  type: :development
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - '='
129
129
  - !ruby/object:Gem::Version
130
- version: 8.0.0.rc1
130
+ version: 8.0.0.rc2
131
131
  description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
132
132
  email: david@loudthinking.com
133
133
  executables:
@@ -318,6 +318,7 @@ files:
318
318
  - lib/rails/generators/rails/application_record/application_record_generator.rb
319
319
  - lib/rails/generators/rails/authentication/USAGE
320
320
  - lib/rails/generators/rails/authentication/authentication_generator.rb
321
+ - lib/rails/generators/rails/authentication/templates/app/channels/application_cable/connection.rb.tt
321
322
  - lib/rails/generators/rails/authentication/templates/app/controllers/concerns/authentication.rb.tt
322
323
  - lib/rails/generators/rails/authentication/templates/app/controllers/passwords_controller.rb.tt
323
324
  - lib/rails/generators/rails/authentication/templates/app/controllers/sessions_controller.rb.tt
@@ -490,10 +491,10 @@ licenses:
490
491
  - MIT
491
492
  metadata:
492
493
  bug_tracker_uri: https://github.com/rails/rails/issues
493
- changelog_uri: https://github.com/rails/rails/blob/v8.0.0.rc1/railties/CHANGELOG.md
494
- documentation_uri: https://api.rubyonrails.org/v8.0.0.rc1/
494
+ changelog_uri: https://github.com/rails/rails/blob/v8.0.0.rc2/railties/CHANGELOG.md
495
+ documentation_uri: https://api.rubyonrails.org/v8.0.0.rc2/
495
496
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
496
- source_code_uri: https://github.com/rails/rails/tree/v8.0.0.rc1/railties
497
+ source_code_uri: https://github.com/rails/rails/tree/v8.0.0.rc2/railties
497
498
  rubygems_mfa_required: 'true'
498
499
  post_install_message:
499
500
  rdoc_options: