ember-cli-rails 0.14.3 → 0.14.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '079bc62bc3e35daf5eefbe6f36e1a220f05e8d8559ef5c54b650e88a4ee726fd'
4
- data.tar.gz: 56d4b1cd987002f93bfcdbaf224577e9a22dda026c660dcea93dda3343f1943f
3
+ metadata.gz: e0986ec5bf3dcf1656ad150a4ab25153d609c19b8389bc5a1984f4de7f719ef0
4
+ data.tar.gz: 5d792cebbb4ae393ff1beff1ddd948c42af86a654f7e8089bca7c962b8c96d3f
5
5
  SHA512:
6
- metadata.gz: 1211190b983441988945da00c600a61cc9b3404a89676e19eea0d4763a026f048b922dcf25bf6454103b306d73633c883b627f9066f76eb7b3d3274a5579ced8
7
- data.tar.gz: 18fe7b423a12804bfd27c9562513df6295487029e80771a24e3e52dbe0d963a3c5ae36324a4d741f04292b93dda2a22ad145451d36f02222478ad1534ab69101
6
+ metadata.gz: 21e68ca9d8f73bcac834ebed7a68e305c678a2c1784e32cf85d5138becc67cba56fb8c83ca136c9e9753fa571397781d33f596acef642fc09b56cae31a83232a
7
+ data.tar.gz: 1a2a27faa8e0e5fb487894182ddb81ad7f59e32ac3c4e5f32dcd729ccc0dba20c725f0ba132517318356ec4fda19367089927ab9165ffaae7921c30c68c3e133
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ 0.14.4
2
+ ------
3
+
4
+ * Read the mount point `render_ember_app` remaps a Vite build's asset URLs
5
+ onto from the route `mount_ember_app` draws, rather than from `params`. A
6
+ page that called `render_ember_app` from any other route took it from the
7
+ query string, so a link such as `/?ember_mount_point=//attacker.example`
8
+ made the page load its scripts and stylesheets from another host (a
9
+ reflected XSS). Affects Vite-based applications since 0.13.2
10
+ ([GHSA-whxv-9q4m-932c](https://github.com/tricknotes/ember-cli-rails/security/advisories/GHSA-whxv-9q4m-932c))
11
+
1
12
  0.14.3
2
13
  ------
3
14
 
@@ -11,9 +11,21 @@ module EmberRailsHelper
11
11
  index_html = EmberCli[name].index_html(
12
12
  head: head,
13
13
  body: body,
14
- mount_point: params[:ember_mount_point],
14
+ mount_point: ember_mount_point,
15
15
  )
16
16
 
17
17
  render html: index_html.html_safe
18
18
  end
19
+
20
+ private
21
+
22
+ # The mount point `mount_ember_app` declares for the route being served.
23
+ #
24
+ # It is written into the document's asset URLs, so read it from the route
25
+ # alone: `params` also carries the query string and the request body, which
26
+ # would let a request choose where a page rendered from any other route
27
+ # loads its scripts from.
28
+ def ember_mount_point
29
+ request.path_parameters[:ember_mount_point]
30
+ end
19
31
  end
@@ -1,3 +1,3 @@
1
1
  module EmberCli
2
- VERSION = "0.14.3".freeze
2
+ VERSION = "0.14.4".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ember-cli-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.3
4
+ version: 0.14.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Pravosud