shopify_app 12.0.1 → 12.0.2

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: e21696bedf0e9066e0363ffa54535563d57b04990c4fd8c39f61b24c9e7dd5a5
4
- data.tar.gz: 0557a4eb040fe7dcc68b576ab90237902c4ec2a7e60f5352607a1753a2dc4d7b
3
+ metadata.gz: dd21d52fbb932f0fef8522975adfb22431ff103d7fa14e4591e0eb24bafeeaec
4
+ data.tar.gz: da650fd1de45574447c28dca6803adf49063e0c879a0eab7d71b2823d3d1f15c
5
5
  SHA512:
6
- metadata.gz: 4adc7c54f7662d8c4427012de16b9aa2bafd3c984ea4bf13d77c36722035f32ed3fe9a00b7d45c4dacad24a4d99d2b3939defcc7a0eeaea99efeed3be2f771a2
7
- data.tar.gz: 2ae0baab7a365863bfc0530a4264b6397f59d447db24ba59fda93f455b44582fd432c2525fc064285b7c314f5bcbd6883568e2cd28460922911d14f340834228
6
+ metadata.gz: 04f13911597abebbc3e32bc72ac42f9cfe01e2370515935bac076ce9517a44767af1f6185260cbeaae6a5eb2f76f48eb19ff9f013d41504d144ba8b23fb7ca6a
7
+ data.tar.gz: 3474caf61956e3bd8c3b4ae37fb326403493e3391805b85f3962aa753e080b0dfc3c3f82173991b099b804784123d5bf6d108e99ab4f1795c16f4f4cdd1ba862
@@ -1,3 +1,7 @@
1
+ 12.0.2
2
+ ------
3
+ * Reverts "Fix for return_to in safari after enable_cookies/granted_storage_access" introduced in 12.0.1
4
+
1
5
  12.0.1
2
6
  ------
3
7
  * disable samesite cookie middleware in tests
@@ -28,8 +28,8 @@
28
28
  window.parent.location.href = this.redirectData.myshopifyUrl + '/admin/apps';
29
29
  }
30
30
 
31
- StorageAccessHelper.prototype.redirectToAppTargetUrl = function() {
32
- window.location.href = this.redirectData.appTargetUrl;
31
+ StorageAccessHelper.prototype.redirectToAppHome = function() {
32
+ window.location.href = this.redirectData.appHomeUrl;
33
33
  }
34
34
 
35
35
  StorageAccessHelper.prototype.sameSiteNoneIncompatible = function(ua) {
@@ -68,7 +68,7 @@
68
68
  if (!document.cookie) {
69
69
  throw 'Cannot set third-party cookie.'
70
70
  }
71
- this.redirectToAppTargetUrl();
71
+ this.redirectToAppHome();
72
72
  } catch (error) {
73
73
  console.warn('Third party cookies may be blocked.', error);
74
74
  this.redirectToAppTLD(ACCESS_DENIED_STATUS);
@@ -90,7 +90,7 @@
90
90
  StorageAccessHelper.prototype.handleHasStorageAccess = function() {
91
91
  if (sessionStorage.getItem('shopify.granted_storage_access')) {
92
92
  // If app was classified by ITP and used Storage Access API to acquire access
93
- this.redirectToAppTargetUrl();
93
+ this.redirectToAppHome();
94
94
  } else {
95
95
  // If app has not been classified by ITP and still has storage access
96
96
  this.redirectToAppTLD(ACCESS_GRANTED_STATUS);
@@ -20,12 +20,11 @@ module ShopifyApp
20
20
 
21
21
  render(:enable_cookies, layout: false, locals: {
22
22
  does_not_have_storage_access_url: top_level_interaction_path(
23
- shop: sanitized_shop_name,
24
- return_to: params[:return_to]
23
+ shop: sanitized_shop_name
25
24
  ),
26
25
  has_storage_access_url: login_url_with_optional_shop(top_level: true),
27
- app_target_url: params[:return_to] || granted_storage_access_path(shop: sanitized_shop_name),
28
- current_shopify_domain: current_shopify_domain
26
+ app_home_url: granted_storage_access_path(shop: sanitized_shop_name),
27
+ current_shopify_domain: current_shopify_domain,
29
28
  })
30
29
  end
31
30
 
@@ -134,12 +133,11 @@ module ShopifyApp
134
133
  layout: false,
135
134
  locals: {
136
135
  does_not_have_storage_access_url: top_level_interaction_path(
137
- shop: sanitized_shop_name,
138
- return_to: session[:return_to]
136
+ shop: sanitized_shop_name
139
137
  ),
140
138
  has_storage_access_url: login_url_with_optional_shop(top_level: true),
141
- app_target_url: session[:return_to] || granted_storage_access_path(shop: sanitized_shop_name),
142
- current_shopify_domain: current_shopify_domain
139
+ app_home_url: granted_storage_access_path(shop: sanitized_shop_name),
140
+ current_shopify_domain: current_shopify_domain,
143
141
  }
144
142
  )
145
143
  end
@@ -32,7 +32,7 @@
32
32
  myshopifyUrl: "https://#{current_shopify_domain}",
33
33
  hasStorageAccessUrl: "#{has_storage_access_url}",
34
34
  doesNotHaveStorageAccessUrl: "#{does_not_have_storage_access_url}",
35
- appTargetUrl: "#{app_target_url}"
35
+ appHomeUrl: "#{app_home_url}"
36
36
  },
37
37
  },
38
38
  )
@@ -24,7 +24,7 @@
24
24
  myshopifyUrl: "https://#{current_shopify_domain}",
25
25
  hasStorageAccessUrl: "#{has_storage_access_url}",
26
26
  doesNotHaveStorageAccessUrl: "#{does_not_have_storage_access_url}",
27
- appTargetUrl: "#{app_target_url}"
27
+ appHomeUrl: "#{app_home_url}"
28
28
  },
29
29
  },
30
30
  )
@@ -100,10 +100,8 @@ module ShopifyApp
100
100
  query_params = {}
101
101
  query_params[:shop] = sanitized_params[:shop] if params[:shop].present?
102
102
 
103
- return_to = session[:return_to] || params[:return_to]
104
-
105
- if return_to.present? && return_to_param_required?
106
- query_params[:return_to] = return_to
103
+ if session[:return_to] && return_to_param_required?
104
+ query_params[:return_to] = session[:return_to]
107
105
  end
108
106
 
109
107
  has_referer_shop_name = referer_sanitized_shop_name.present?
@@ -1,3 +1,3 @@
1
1
  module ShopifyApp
2
- VERSION = '12.0.1'.freeze
2
+ VERSION = '12.0.2'.freeze
3
3
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shopify_app",
3
- "version": "12.0.1",
3
+ "version": "12.0.2",
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: 12.0.1
4
+ version: 12.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-07 00:00:00.000000000 Z
11
+ date: 2020-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser_sniffer