carrierwave 2.2.1 → 2.2.3

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

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a16b1f5ad9e05370bb6ad6381f5d94b36d3233c3ddbbd4782b54d3a01fb6a747
4
- data.tar.gz: a5093ecbce4d1ee217c6b78b57f6c50d6ecad9cff0c3b865a22ebbbd196743aa
3
+ metadata.gz: a6a0cdcecad532a99cca81fbb28113f5ebc67e4392c9c69fd4b1b93b84864eb2
4
+ data.tar.gz: 923a9e4630fd3771e9401be7a2cbfee521df983396c3a5a72f58bd23f1812a87
5
5
  SHA512:
6
- metadata.gz: 561070ea4b8d2eb9b6e606e4eb465aa3c6ecf3c5664102b5de9ada7317adbc8c8c2561b68baed39acb656cdece7509455e359b3f5ef9cb0e0c85202458c9ac02
7
- data.tar.gz: 386f211d2fb219185543d330e84cbc7331ef8fe0f48992a9ef98f965e96dce2b7ec8731317951867bfc68bf7496c08211cc840003130cc20154dd4173b095d47
6
+ metadata.gz: dc28940e27fb1b721ae86e98b5bf026409ab4d09ba09394e266470ed93c3fe36bd0a78d57c633b548e2cc3455b6442b6df212b43868d6e4b879719b85976fed0
7
+ data.tar.gz: 313afd97eb83c72cd84cfdcfd94d6a8eea6affc34884291d40adff251d2dda1d5080555f01bb02496480ce42721ca7e93c48749eaec7a7b09ee52268dd1b6400
@@ -29,8 +29,14 @@ module CarrierWave
29
29
  response = OpenURI.open_uri(process_uri(url.to_s), headers)
30
30
  else
31
31
  request = nil
32
- response = SsrfFilter.get(uri, headers: headers) do |req|
33
- request = req
32
+ if ::SsrfFilter::VERSION.to_f < 1.1
33
+ response = SsrfFilter.get(uri, headers: headers) do |req|
34
+ request = req
35
+ end
36
+ else
37
+ response = SsrfFilter.get(uri, headers: headers, request_proc: ->(req) { request = req }) do |res|
38
+ res.body # ensure to read body
39
+ end
34
40
  end
35
41
  response.uri = request.uri
36
42
  response.value
@@ -335,7 +335,7 @@ module CarrierWave
335
335
  end
336
336
 
337
337
  if type.nil?
338
- type = Marcel::Magic.by_path(file).try(:type)
338
+ type = Marcel::Magic.by_path(path).try(:type)
339
339
  type = 'invalid/invalid' unless type.nil? || type.start_with?('text/')
340
340
  end
341
341
 
@@ -30,7 +30,7 @@ module CarrierWave
30
30
  #
31
31
  # Google credentials contain the following keys:
32
32
  # [:google_storage_access_key_id]
33
- # [:google_storage_secrete_access_key]
33
+ # [:google_storage_secret_access_key]
34
34
  #
35
35
  #
36
36
  # Local credentials contain the following keys:
@@ -1,3 +1,3 @@
1
1
  module CarrierWave
2
- VERSION = "2.2.1"
2
+ VERSION = "2.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Nicklas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-30 00:00:00.000000000 Z
11
+ date: 2022-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -412,7 +412,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
412
412
  - !ruby/object:Gem::Version
413
413
  version: '0'
414
414
  requirements: []
415
- rubygems_version: 3.1.2
415
+ rubygems_version: 3.3.7
416
416
  signing_key:
417
417
  specification_version: 4
418
418
  summary: Ruby file upload library