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 +4 -4
- data/lib/carrierwave/bombshelter.rb +6 -1
- data/lib/carrierwave/bombshelter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 238a081983d722813211dc818427fba38b543e67
|
4
|
+
data.tar.gz: d4d2a620bb491f213b0012cd717a66ee33401cb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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
|
11
|
+
date: 2015-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|