ahoy_email 2.1.1 → 2.1.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: bf88f44f04ee798926e9363928aed4be7c34d0b4f5456b01f1dc210f18967cc4
4
- data.tar.gz: bb0c2ea92f067cbd6f37f7d06bb7700f51427dd68f178d0405ccf31f02b21fea
3
+ metadata.gz: c5533583685af32099af8100fe872c8dd146b1b3539d373ba99c12774745c24f
4
+ data.tar.gz: d4aa807926b5e0d70421c75dbc507ddd1ffeb7856c9c1706c71d4a6ff922dd38
5
5
  SHA512:
6
- metadata.gz: 9568577466f777d12ad274926490b72f0976eec913b12e8e524f3af66612f22a9a07fa5065c5e2f8817b735ee4ed683a2391b62211aadda716168b3b12833f4b
7
- data.tar.gz: 122f4e7758d69d4cba1c16b3ff677317084b562921db52d7bcd9408b760aa5ef3e5ebd61808e04e39c1f6e538722d51247daba68037bad88939338049db6f80e
6
+ metadata.gz: 81ce556e09096d9ffbddcecbfd512023ff86f5acee6a8327634f37fe054d9b1547706b92d7de812c8932fe79257cef380976e0a8101467085d45865dfe45f967
7
+ data.tar.gz: 830f93a92a24c1d5a338bcf48555df6684e227c07da331b47b8362698f1f928b0282364d13d6533f4d8dfb46b75fa615b60f807b334e6d77c5dfab9fc05dfcd2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.1.2 (2022-02-09)
2
+
3
+ - Fixed external redirects with Rails 7
4
+
1
5
  ## 2.1.1 (2021-12-13)
2
6
 
3
7
  - Added experimental support for Active Record encryption
@@ -25,6 +25,9 @@ module Ahoy
25
25
  expected_signature = AhoyEmail::Utils.signature(token: token, campaign: campaign, url: url)
26
26
  end
27
27
 
28
+ redirect_options = {}
29
+ redirect_options[:allow_other_host] = true if ActionPack::VERSION::MAJOR >= 7
30
+
28
31
  if ActiveSupport::SecurityUtils.secure_compare(signature, expected_signature)
29
32
  data = {}
30
33
  data[:campaign] = campaign if campaign
@@ -33,10 +36,10 @@ module Ahoy
33
36
  data[:controller] = self
34
37
  AhoyEmail::Utils.publish(:click, data)
35
38
 
36
- redirect_to url
39
+ redirect_to url, **redirect_options
37
40
  else
38
41
  if AhoyEmail.invalid_redirect_url
39
- redirect_to AhoyEmail.invalid_redirect_url
42
+ redirect_to AhoyEmail.invalid_redirect_url, **redirect_options
40
43
  else
41
44
  render plain: "Link expired", status: :not_found
42
45
  end
@@ -1,3 +1,3 @@
1
1
  module AhoyEmail
2
- VERSION = "2.1.1"
2
+ VERSION = "2.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ahoy_email
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-14 00:00:00.000000000 Z
11
+ date: 2022-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubygems_version: 3.2.32
126
+ rubygems_version: 3.3.3
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: First-party email analytics for Rails