carrierwave-bombshelter 0.1.1.3 → 0.1.1.4

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
  SHA1:
3
- metadata.gz: fc80e16e3c08b5748cdc836f828a4b269c895da7
4
- data.tar.gz: 446ca011a914646a2573a4a1106d82d5a0b13631
3
+ metadata.gz: 238a081983d722813211dc818427fba38b543e67
4
+ data.tar.gz: d4d2a620bb491f213b0012cd717a66ee33401cb2
5
5
  SHA512:
6
- metadata.gz: 442b0b5723c16d1239b24f2e23dc1c190e6c0aabe424834d717f18d6590446384e50f9638fdd20045f78e54d4e6140442630fa67e41ba51a6aedc84e423e1ff2
7
- data.tar.gz: beb715172ee5ddeeb4d7ab2d641a06eef77a243371f2faa3b2ea8c5c0e5cf4ed2254eb9e9fd5abb31c35707765a2399ee841141bf8fbdff893a7673c237f1739
6
+ metadata.gz: 6e33db52fd10378ffd5b009ffef23b6db85f507120bce254ac8d965fbd278c7e1908e4724029117ae279fe7adaf60cf6221252840dd875723515e894b00fe4a4
7
+ data.tar.gz: f5cde2ce7a0dcbe71429e418cef39bc077bbdf874bdcd48c510f90efb357673079c0723c4ce3c00bd386ff3bd8154134464d11298f2d66ddedf4173cfec54371
@@ -27,7 +27,7 @@ module CarrierWave
27
27
  private
28
28
 
29
29
  def protect_from_image_bomb!(new_file)
30
- image = FastImage.new(new_file.path || new_file.file)
30
+ image = FastImage.new(new_file.path || get_real_file(new_file.file))
31
31
  check_image_type!(image)
32
32
  check_pixel_dimensions!(image)
33
33
  end
@@ -48,5 +48,10 @@ module CarrierWave
48
48
  x_size: max_sizes[0], y_size: max_sizes[1]
49
49
  )
50
50
  end
51
+
52
+ def get_real_file(file)
53
+ return file unless file.is_a? CarrierWave::SanitizedFile
54
+ get_real_file(file.file)
55
+ end
51
56
  end
52
57
  end
@@ -1,5 +1,5 @@
1
1
  module CarrierWave
2
2
  module BombShelter
3
- VERSION = '0.1.1.3'
3
+ VERSION = '0.1.1.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave-bombshelter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.3
4
+ version: 0.1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - DarthSim
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-29 00:00:00.000000000 Z
11
+ date: 2015-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler