carrierwave 3.1.2 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 20e93cc014326f32bc9123d74648c047a9eeaf634a421981df01ece46dc142cc
|
|
4
|
+
data.tar.gz: e86f6c907282bc12306f916c31084f34a20e815a4b64291971eefbf366f7ec0c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0b1ade5c07dccfc124750e5c066e5a8dff02c52a918e3af496c1de35a42e836d1d1465fe7f48283e3a088214d843b107102fc7a87e0a68d148884d07e0378529
|
|
7
|
+
data.tar.gz: 9597174ba08ceb10b8ab91e76e67fd1d37a54c97dac99cb745408da716297bbd960c81b809ec003d6b9695dbe0c2d363c1e958e25a43602b5049f6c2f25bd1a0
|
|
@@ -54,7 +54,10 @@ module CarrierWave
|
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
def denylisted_content_type?(denylist, content_type)
|
|
57
|
-
Array(denylist).any?
|
|
57
|
+
Array(denylist).any? do |item|
|
|
58
|
+
item = Regexp.quote(item) if item.class != Regexp
|
|
59
|
+
content_type =~ /#{item}/
|
|
60
|
+
end
|
|
58
61
|
end
|
|
59
62
|
|
|
60
63
|
end # ContentTypeDenylist
|
data/lib/carrierwave/version.rb
CHANGED
|
@@ -40,6 +40,14 @@ class <%= class_name %>Uploader < CarrierWave::Uploader::Base
|
|
|
40
40
|
# %w(jpg jpeg gif png)
|
|
41
41
|
# end
|
|
42
42
|
|
|
43
|
+
# Add a content_type_allowlist to restrict uploads by MIME type.
|
|
44
|
+
# Without it, a user could upload a harmful file
|
|
45
|
+
# with a safe extension (content-type spoofing).
|
|
46
|
+
# For the previous extension_allowlist you might use something like this:
|
|
47
|
+
# def content_type_allowlist
|
|
48
|
+
# /image\//
|
|
49
|
+
# end
|
|
50
|
+
|
|
43
51
|
# Override the filename of the uploaded files:
|
|
44
52
|
# Avoid using model.id or version_name here, see uploader/store.rb for details.
|
|
45
53
|
# def filename
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: carrierwave
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.1.
|
|
4
|
+
version: 3.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jonas Nicklas
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activesupport
|
|
@@ -369,8 +368,8 @@ files:
|
|
|
369
368
|
homepage: https://github.com/carrierwaveuploader/carrierwave
|
|
370
369
|
licenses:
|
|
371
370
|
- MIT
|
|
372
|
-
metadata:
|
|
373
|
-
|
|
371
|
+
metadata:
|
|
372
|
+
changelog_uri: https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md
|
|
374
373
|
rdoc_options:
|
|
375
374
|
- "--main"
|
|
376
375
|
require_paths:
|
|
@@ -386,8 +385,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
386
385
|
- !ruby/object:Gem::Version
|
|
387
386
|
version: '0'
|
|
388
387
|
requirements: []
|
|
389
|
-
rubygems_version: 3.
|
|
390
|
-
signing_key:
|
|
388
|
+
rubygems_version: 3.6.9
|
|
391
389
|
specification_version: 4
|
|
392
390
|
summary: Ruby file upload library
|
|
393
391
|
test_files: []
|