shopify_app 18.1.0 → 18.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85eb4cdd7fac0b5aef1c84b39cbf85d96d068e04ee6a9de66870000e7ab5c30b
4
- data.tar.gz: a6958a471887ebd1e3b45732eab2f210db0e5788b309d5f8678a1d8138eabcf8
3
+ metadata.gz: 4571927d22f1c18f5eef9e632f8ff6b1ebd6b349535326689329ff58f3671db1
4
+ data.tar.gz: 64042b37063c63155d438168bac3d67bca792b88ed094a0e19a1b67fc6f3d157
5
5
  SHA512:
6
- metadata.gz: 35a3894f7588fb7eec5ecd0c093df12ef4fc5b5fe14a1d80d7d18f2bba8e6c48e9e1a3bbd8aeb6b0cbf31ff55b1401598a5d8660bf9a0a383b24bf6133641b67
7
- data.tar.gz: c20fb9f5e670060b3cf68132d6e4c8b5685323b98cf811de9a4828eceb4942edcd4c7a0dae0675c618d7af35a4ee3c3586f0dadd639eb0946fec8f529e2ffacf
6
+ metadata.gz: 7eea139dac2c0ad527e52b486b027ede7185f9d457210f5fcb38de38c983e2f8156909dcee422f0204054d1b955375b9658522587e7561fcba3a8e7948e6cb93
7
+ data.tar.gz: b2baed7f9cd833f4f1fcf54ae8ffc54327f2afc259c786b7dd7ec579d7b2010b518283c70a2004ad1c0529221b97480659672f5c064e79710fd6285437236b9b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ 18.1.1 (Feb 2, 2022)
2
+ * Fix bug causing `unsafe-inline` CSP violation. [#1362](https://github.com/Shopify/shopify_app/pull/1362)
3
+
1
4
  18.1.0 (Jan 28, 2022)
2
5
  ----------
3
6
  * Support Rails 7 [#1354](https://github.com/Shopify/shopify_app/pull/1354)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shopify_app (18.1.0)
4
+ shopify_app (18.1.1)
5
5
  browser_sniffer (~> 1.4.0)
6
6
  jwt (>= 2.2.3)
7
7
  omniauth-rails_csrf_protection
@@ -119,7 +119,7 @@ GEM
119
119
  faraday-retry (1.0.3)
120
120
  globalid (1.0.0)
121
121
  activesupport (>= 5.0)
122
- graphql (1.13.6)
122
+ graphql (1.13.8)
123
123
  graphql-client (0.17.0)
124
124
  activesupport (>= 3.0)
125
125
  graphql (~> 1.10)
data/README.md CHANGED
@@ -17,6 +17,7 @@ This gem builds Rails applications that can be embedded in the Shopify Admin.
17
17
  [Contributing](/CONTRIBUTING.md) |
18
18
  [License](/LICENSE)
19
19
 
20
+
20
21
  ## Introduction
21
22
 
22
23
  This gem includes a Rails engine, generators, modules, and mixins that help create Rails applications that work with Shopify APIs. The [Shopify App Rails engine](/docs/shopify_app/engine.md) provides all the code required to implement OAuth with Shopify. The [default Shopify App generator](/docs/shopify_app/generators.md#-environment-rails-generate-shopify_app) builds an app that can be embedded in the Shopify Admin and secures it with [session tokens](https://shopify.dev/concepts/apps/building-embedded-apps-using-session-tokens).
@@ -5,7 +5,7 @@
5
5
  var AppBridge = window['app-bridge'];
6
6
  var createApp = AppBridge.default;
7
7
  var Redirect = AppBridge.actions.Redirect;
8
- var shopifyData = window.shopifyData;
8
+ var shopifyData = document.body.dataset;
9
9
 
10
10
  var app = createApp({
11
11
  apiKey: shopifyData.apiKey,
@@ -126,7 +126,7 @@
126
126
 
127
127
  /* ITP 2.0 solution: handles cookie partitioning */
128
128
  StorageAccessHelper.prototype.setUpHelper = function() {
129
- var shopifyData = window.shopifyData;
129
+ var shopifyData = document.body.dataset;
130
130
  return new ITPHelper({redirectUrl: "https://" + shopifyData.shopOrigin + "/admin/apps/" + shopifyData.apiKey + shopifyData.returnTo});
131
131
  }
132
132
 
@@ -5,13 +5,6 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <base target="_top">
7
7
  <title>Redirecting…</title>
8
- <script>
9
- window.shopifyData = {
10
- apiKey: '<%= ShopifyApp.configuration.api_key %>',
11
- shopOrigin: '<%= @shop %>',
12
- returnTo: '<%= params[:return_to] %>',
13
- };
14
- </script>
15
8
  <%= render 'shopify_app/partials/layout_styles' %>
16
9
  <%= render 'shopify_app/partials/typography_styles' %>
17
10
  <%= render 'shopify_app/partials/card_styles' %>
@@ -24,7 +17,7 @@
24
17
 
25
18
  <%= javascript_include_tag('shopify_app/enable_cookies', crossorigin: 'anonymous', integrity: true) %>
26
19
  </head>
27
- <body data-redirect-url="<%= @url %>">
20
+ <body data-api-key="<%= ShopifyApp.configuration.api_key %>" data-shop-origin="<%= @shop %>" data-redirect-url="<%= @url %>" data-retutn-to="<%= params[:return_to] %>">
28
21
  <%=
29
22
  content_tag(
30
23
  :div, nil,
@@ -5,13 +5,6 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <base target="_top">
7
7
  <title>Redirecting…</title>
8
- <script>
9
- window.shopifyData = {
10
- apiKey: '<%= ShopifyApp.configuration.api_key %>',
11
- shopOrigin: '<%= current_shopify_domain %>',
12
- returnTo: '<%= params[:return_to] %>',
13
- };
14
- </script>
15
8
  <%= render 'shopify_app/partials/layout_styles' %>
16
9
  <%= render 'shopify_app/partials/typography_styles' %>
17
10
  <%= render 'shopify_app/partials/card_styles' %>
@@ -22,7 +15,7 @@
22
15
  }
23
16
  </style>
24
17
  </head>
25
- <body>
18
+ <body data-api-key="<%= ShopifyApp.configuration.api_key %>" data-shop-origin="<%= current_shopify_domain %>" data-return-to="<%= params[:return_to] %>">
26
19
  <%=
27
20
  content_tag(:div, nil,
28
21
  id: 'redirection-target',
@@ -5,15 +5,9 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <base target="_top">
7
7
  <title>Redirecting…</title>
8
- <script>
9
- window.shopifyData = {
10
- apiKey: '<%= ShopifyApp.configuration.api_key %>',
11
- shopOrigin: '<%= current_shopify_domain %>',
12
- };
13
- </script>
14
8
  <%= javascript_include_tag('shopify_app/redirect', crossorigin: 'anonymous', integrity: true) %>
15
9
  </head>
16
- <body>
10
+ <body data-api-key="<%= ShopifyApp.configuration.api_key %>" data-shop-origin="<%= current_shopify_domain %>">
17
11
  <%=
18
12
  content_tag(:div, nil,
19
13
  id: 'redirection-target',
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ShopifyApp
3
- VERSION = '18.1.0'
3
+ VERSION = '18.1.1'
4
4
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shopify_app",
3
- "version": "18.1.0",
3
+ "version": "18.1.1",
4
4
  "repository": "git@github.com:Shopify/shopify_app.git",
5
5
  "author": "Shopify",
6
6
  "license": "MIT",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 18.1.0
4
+ version: 18.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-01 00:00:00.000000000 Z
11
+ date: 2022-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser_sniffer