Skip to content

Commit

Permalink
Merge branch '7-0-4-sec' into 7-0-stable
Browse files Browse the repository at this point in the history
  • Loading branch information
jhawthorn committed Mar 13, 2023
2 parents fc899b1 + c15ee6e commit 98497a6
Show file tree
Hide file tree
Showing 42 changed files with 290 additions and 92 deletions.
119 changes: 63 additions & 56 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,88 +24,88 @@ GIT
PATH
remote: .
specs:
actioncable (7.0.4.2)
actionpack (= 7.0.4.2)
activesupport (= 7.0.4.2)
actioncable (7.0.4.3)
actionpack (= 7.0.4.3)
activesupport (= 7.0.4.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.4.2)
actionpack (= 7.0.4.2)
activejob (= 7.0.4.2)
activerecord (= 7.0.4.2)
activestorage (= 7.0.4.2)
activesupport (= 7.0.4.2)
actionmailbox (7.0.4.3)
actionpack (= 7.0.4.3)
activejob (= 7.0.4.3)
activerecord (= 7.0.4.3)
activestorage (= 7.0.4.3)
activesupport (= 7.0.4.3)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.4.2)
actionpack (= 7.0.4.2)
actionview (= 7.0.4.2)
activejob (= 7.0.4.2)
activesupport (= 7.0.4.2)
actionmailer (7.0.4.3)
actionpack (= 7.0.4.3)
actionview (= 7.0.4.3)
activejob (= 7.0.4.3)
activesupport (= 7.0.4.3)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.4.2)
actionview (= 7.0.4.2)
activesupport (= 7.0.4.2)
actionpack (7.0.4.3)
actionview (= 7.0.4.3)
activesupport (= 7.0.4.3)
rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.4.2)
actionpack (= 7.0.4.2)
activerecord (= 7.0.4.2)
activestorage (= 7.0.4.2)
activesupport (= 7.0.4.2)
actiontext (7.0.4.3)
actionpack (= 7.0.4.3)
activerecord (= 7.0.4.3)
activestorage (= 7.0.4.3)
activesupport (= 7.0.4.3)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.4.2)
activesupport (= 7.0.4.2)
actionview (7.0.4.3)
activesupport (= 7.0.4.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.4.2)
activesupport (= 7.0.4.2)
activejob (7.0.4.3)
activesupport (= 7.0.4.3)
globalid (>= 0.3.6)
activemodel (7.0.4.2)
activesupport (= 7.0.4.2)
activerecord (7.0.4.2)
activemodel (= 7.0.4.2)
activesupport (= 7.0.4.2)
activestorage (7.0.4.2)
actionpack (= 7.0.4.2)
activejob (= 7.0.4.2)
activerecord (= 7.0.4.2)
activesupport (= 7.0.4.2)
activemodel (7.0.4.3)
activesupport (= 7.0.4.3)
activerecord (7.0.4.3)
activemodel (= 7.0.4.3)
activesupport (= 7.0.4.3)
activestorage (7.0.4.3)
actionpack (= 7.0.4.3)
activejob (= 7.0.4.3)
activerecord (= 7.0.4.3)
activesupport (= 7.0.4.3)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.4.2)
activesupport (7.0.4.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
rails (7.0.4.2)
actioncable (= 7.0.4.2)
actionmailbox (= 7.0.4.2)
actionmailer (= 7.0.4.2)
actionpack (= 7.0.4.2)
actiontext (= 7.0.4.2)
actionview (= 7.0.4.2)
activejob (= 7.0.4.2)
activemodel (= 7.0.4.2)
activerecord (= 7.0.4.2)
activestorage (= 7.0.4.2)
activesupport (= 7.0.4.2)
rails (7.0.4.3)
actioncable (= 7.0.4.3)
actionmailbox (= 7.0.4.3)
actionmailer (= 7.0.4.3)
actionpack (= 7.0.4.3)
actiontext (= 7.0.4.3)
actionview (= 7.0.4.3)
activejob (= 7.0.4.3)
activemodel (= 7.0.4.3)
activerecord (= 7.0.4.3)
activestorage (= 7.0.4.3)
activesupport (= 7.0.4.3)
bundler (>= 1.15.0)
railties (= 7.0.4.2)
railties (7.0.4.2)
actionpack (= 7.0.4.2)
activesupport (= 7.0.4.2)
railties (= 7.0.4.3)
railties (7.0.4.3)
actionpack (= 7.0.4.3)
activesupport (= 7.0.4.3)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand Down Expand Up @@ -199,6 +199,8 @@ GEM
dante (0.2.0)
date (3.3.3)
debug (1.7.1)
irb (>= 1.5.0)
reline (>= 0.3.1)
declarative (0.0.20)
delayed_job (4.1.11)
activesupport (>= 3.0, < 8.0)
Expand Down Expand Up @@ -261,7 +263,7 @@ GEM
fugit (1.8.0)
et-orbi (~> 1, >= 1.2.7)
raabro (~> 1.4)
globalid (1.0.1)
globalid (1.1.0)
activesupport (>= 5.0)
google-apis-core (0.9.5)
addressable (~> 2.5, >= 2.5.1)
Expand Down Expand Up @@ -309,6 +311,9 @@ GEM
importmap-rails (1.1.5)
actionpack (>= 6.0.0)
railties (>= 6.0.0)
io-console (0.6.0)
irb (1.6.3)
reline (>= 0.3.0)
jmespath (1.6.2)
jsbundling-rails (1.1.1)
railties (>= 6.0.0)
Expand All @@ -321,7 +326,7 @@ GEM
loofah (2.19.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.8.0.1)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
Expand Down Expand Up @@ -412,6 +417,8 @@ GEM
redis-namespace (1.10.0)
redis (>= 4)
regexp_parser (2.6.1)
reline (0.3.2)
io-console (~> 0.5)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
Expand Down Expand Up @@ -555,7 +562,7 @@ GEM
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.6)
zeitwerk (2.6.7)

PLATFORMS
ruby
Expand Down
2 changes: 1 addition & 1 deletion RAILS_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.4.2
7.0.4.3
5 changes: 5 additions & 0 deletions actioncable/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Rails 7.0.4.3 (March 13, 2023) ##

* No changes.


## Rails 7.0.4.2 (January 24, 2023) ##

* No changes.
Expand Down
2 changes: 1 addition & 1 deletion actioncable/lib/action_cable/gem_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module VERSION
MAJOR = 7
MINOR = 0
TINY = 4
PRE = "2"
PRE = "3"

STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
Expand Down
2 changes: 1 addition & 1 deletion actioncable/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rails/actioncable",
"version": "7.0.4-2",
"version": "7.0.4-3",
"description": "WebSocket framework for Ruby on Rails.",
"module": "app/assets/javascripts/actioncable.esm.js",
"main": "app/assets/javascripts/actioncable.js",
Expand Down
5 changes: 5 additions & 0 deletions actionmailbox/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Rails 7.0.4.3 (March 13, 2023) ##

* No changes.


## Rails 7.0.4.2 (January 24, 2023) ##

* No changes.
Expand Down
2 changes: 1 addition & 1 deletion actionmailbox/lib/action_mailbox/gem_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module VERSION
MAJOR = 7
MINOR = 0
TINY = 4
PRE = "2"
PRE = "3"

STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
Expand Down
5 changes: 5 additions & 0 deletions actionmailer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Rails 7.0.4.3 (March 13, 2023) ##

* No changes.


## Rails 7.0.4.2 (January 24, 2023) ##

* No changes.
Expand Down
2 changes: 1 addition & 1 deletion actionmailer/lib/action_mailer/gem_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module VERSION
MAJOR = 7
MINOR = 0
TINY = 4
PRE = "2"
PRE = "3"

STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
Expand Down
4 changes: 4 additions & 0 deletions actionpack/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@

*Nathan Bardoux*

## Rails 7.0.4.3 (March 13, 2023) ##

* No changes.


## Rails 7.0.4.2 (January 24, 2023) ##

Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_pack/gem_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module VERSION
MAJOR = 7
MINOR = 0
TINY = 4
PRE = "2"
PRE = "3"

STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
Expand Down
5 changes: 5 additions & 0 deletions actiontext/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Rails 7.0.4.3 (March 13, 2023) ##

* No changes.


## Rails 7.0.4.2 (January 24, 2023) ##

* No changes.
Expand Down
2 changes: 1 addition & 1 deletion actiontext/lib/action_text/gem_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module VERSION
MAJOR = 7
MINOR = 0
TINY = 4
PRE = "2"
PRE = "3"

STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
Expand Down
2 changes: 1 addition & 1 deletion actiontext/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rails/actiontext",
"version": "7.0.4-2",
"version": "7.0.4-3",
"description": "Edit and display rich text in Rails applications",
"main": "app/assets/javascripts/actiontext.js",
"type": "module",
Expand Down
7 changes: 7 additions & 0 deletions actionview/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
*Chris Gunther*


## Rails 7.0.4.3 (March 13, 2023) ##

* Ignore certain data-* attributes in rails-ujs when element is contenteditable

[CVE-2023-23913]


## Rails 7.0.4.2 (January 24, 2023) ##

* No changes.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#= require_tree ../utils

{ matches, getData, setData, stopEverything, formElements } = Rails
{ matches, getData, setData, stopEverything, formElements, isContentEditable } = Rails

Rails.handleDisabledElement = (e) ->
element = this
Expand All @@ -14,6 +14,9 @@ Rails.enableElement = (e) ->
else
element = e

if isContentEditable(element)
return

if matches(element, Rails.linkDisableSelector)
enableLinkElement(element)
else if matches(element, Rails.buttonDisableSelector) or matches(element, Rails.formEnableSelector)
Expand All @@ -24,6 +27,10 @@ Rails.enableElement = (e) ->
# Unified function to disable an element (link, button and form)
Rails.disableElement = (e) ->
element = if e instanceof Event then e.target else e

if isContentEditable(element)
return

if matches(element, Rails.linkDisableSelector)
disableLinkElement(element)
else if matches(element, Rails.buttonDisableSelector) or matches(element, Rails.formDisableSelector)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#= require_tree ../utils

{ stopEverything } = Rails
{ isContentEditable } = Rails

# Handles "data-method" on links such as:
# <a href="/users/5" data-method="delete" rel="nofollow" data-confirm="Are you sure?">Delete</a>
Expand All @@ -9,6 +10,9 @@ Rails.handleMethod = (e) ->
method = link.getAttribute('data-method')
return unless method

if isContentEditable(this)
return

href = Rails.href(link)
csrfToken = Rails.csrfToken()
csrfParam = Rails.csrfParam()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
matches, getData, setData
fire, stopEverything
ajax, isCrossDomain
serializeElement
serializeElement,
isContentEditable
} = Rails

# Checks "data-remote" if true to handle the request through a XHR request.
Expand All @@ -21,6 +22,10 @@ Rails.handleRemote = (e) ->
fire(element, 'ajax:stopped')
return false

if isContentEditable(element)
fire(element, 'ajax:stopped')
return false

withCredentials = element.getAttribute('data-with-credentials')
dataType = element.getAttribute('data-type') or 'script'

Expand Down
Loading

0 comments on commit 98497a6

Please sign in to comment.