avo 2.14.0 → 2.14.2.pre.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of avo might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58033ed16e041a89bae5bc13843079be1c9daa0f85004bf810645e24960e7526
4
- data.tar.gz: d401c18ba4edb14825be275b68851c0b9e32e3ff2427a79a27b5bafb377f4d51
3
+ metadata.gz: 4b2dd6f882eac9d9271bbb4824fb9fb71bad9c77c7fa1e71df410cb9b4aeb54f
4
+ data.tar.gz: 32a04dae63c3694152bcc9b531d4d323e135b2440becd4a33f721ad9f351b1c5
5
5
  SHA512:
6
- metadata.gz: 32d0cda8da582e3b3104a0f676c968d11ed28cd222b26014651fec4405bdd14b868c39685f257d473c4d41c2eab5e0c1923924df097e82cc8ace744150f46bab
7
- data.tar.gz: 502abd413467a87d504ae3d82dffcee741fdc96a76a5458b8501826be5da494bf6e054af8a65d1a403a641e7475455a55acb1863e229ea6ad8a26037e255f731
6
+ metadata.gz: 5cee10bf690be47c5151cf6d00d1ddff9c32c0f3306be7b99962477e1d61c731dca473bcca93cce2eeea9a7ee4b0fe27ba160fe45548ae7042b900b0a9711f3f
7
+ data.tar.gz: 12267b7e20da3cd91c971e4b86d7ee872cb584eee965b9e8c7c92bc3235a42b17a0ea75b25d30abd694647548341300a1342bb383b800cb6dca9b3e7134e2c26
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (2.14.0)
4
+ avo (2.14.2.pre.1)
5
5
  active_link_to
6
6
  addressable
7
7
  breadcrumbs_on_rails
@@ -256,6 +256,8 @@ GEM
256
256
  nokogiri (1.13.7)
257
257
  mini_portile2 (~> 2.8.0)
258
258
  racc (~> 1.4)
259
+ nokogiri (1.13.7-x86_64-linux)
260
+ racc (~> 1.4)
259
261
  orm_adapter (0.5.0)
260
262
  pagy (5.10.1)
261
263
  activesupport
@@ -21,7 +21,7 @@
21
21
  <div class="flex space-x-2">
22
22
  <div class="flex">
23
23
  <% if @resource.authorization.authorize_action(:download_attachments?, raise_exception: false) %>
24
- <%= a_link file.url(disposition: :attachment),
24
+ <%= a_link Rails.application.routes.url_helpers.rails_blob_path(file, only_path: true, disposition: :attachment),
25
25
  icon: 'heroicons/outline/download',
26
26
  color: :primary,
27
27
  download: true,
data/config/master.key ADDED
@@ -0,0 +1 @@
1
+ 2aeb23d82b909d9c6b5abb62f7058c2a
@@ -18,7 +18,7 @@ module Avo
18
18
  def initialize(message:, purpose:)
19
19
  @message = message
20
20
  @purpose = purpose
21
- @crypt = ActiveSupport::MessageEncryptor.new(Rails.application.secrets.secret_key_base[0..31])
21
+ @crypt = ActiveSupport::MessageEncryptor.new(encryption_key)
22
22
  end
23
23
 
24
24
  def encrypt
@@ -28,6 +28,20 @@ module Avo
28
28
  def decrypt
29
29
  crypt.decrypt_and_verify(message, purpose: purpose)
30
30
  end
31
+
32
+ private
33
+
34
+ def encryption_key
35
+ secret_key_base[0..31]
36
+ rescue
37
+ # This will fail the decryption process.
38
+ # It's here only to keep Avo from crashing
39
+ SecureRandom.random_bytes(32)
40
+ end
41
+
42
+ def secret_key_base
43
+ Rails.application.secrets.secret_key_base || ENV['SECRET_KEY_BASE']
44
+ end
31
45
  end
32
46
  end
33
47
  end
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "2.14.0" unless const_defined?(:VERSION)
2
+ VERSION = "2.14.2.pre.1" unless const_defined?(:VERSION)
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.14.0
4
+ version: 2.14.2.pre.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin
@@ -1748,6 +1748,7 @@ files:
1748
1748
  - config/cable.yml
1749
1749
  - config/credentials.yml.enc
1750
1750
  - config/initializers/pagy.rb
1751
+ - config/master.key
1751
1752
  - config/routes.rb
1752
1753
  - config/spring.rb
1753
1754
  - db/factories.rb
@@ -1973,9 +1974,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1973
1974
  version: 2.4.0
1974
1975
  required_rubygems_version: !ruby/object:Gem::Requirement
1975
1976
  requirements:
1976
- - - ">="
1977
+ - - ">"
1977
1978
  - !ruby/object:Gem::Version
1978
- version: '0'
1979
+ version: 1.3.1
1979
1980
  requirements: []
1980
1981
  rubygems_version: 3.3.3
1981
1982
  signing_key: