publify_core 10.0.3 → 10.0.4
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: cb863f2b83b8da8700912e96e0c744d024e7a3e4ffa362d9ad935f058ce9e9a5
|
|
4
|
+
data.tar.gz: 49608e62a576f90c263501a080e78aa54aa9c46277ef49e8d7fbde9af7891ca4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d5d506b38f535284cc378b38d22afc611036ababfc81a5c8be05afe6736128fc76f6dd3639997ee7a7b3180e27d4071ab07cf1c5f69ad4c8f90093a384f0e94b
|
|
7
|
+
data.tar.gz: a1fa53f2e4d0ceffc96b32f67961cb23b09806c4ded69bdba2fffbcad4dbd4198694b2f145fb6a4971f9e4bfd7ce7c6edd1a0ef1347af5245739519be3676324
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 10.0.4 / 2026-10-04
|
|
4
|
+
|
|
5
|
+
* Refuse attempts to upload a file detected as text with an html extension ([#267] by [mvz])
|
|
6
|
+
|
|
7
|
+
[#267]: https://github.com/publify/publify_core/pull/267
|
|
8
|
+
|
|
3
9
|
## 10.0.3 / 2025-03-28
|
|
4
10
|
|
|
5
11
|
* Limit accepted parameters for Sidebar update in Admin ([#159] by [mvz])
|
|
@@ -57,9 +57,11 @@ class ResourceUploader < CarrierWave::Uploader::Base
|
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
def check_content_type!(new_file)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
detected_type = if image? new_file
|
|
61
|
+
type_from_content(new_file)
|
|
62
|
+
else
|
|
63
|
+
type_from_name(new_file)
|
|
64
|
+
end
|
|
63
65
|
if detected_type != new_file.content_type
|
|
64
66
|
raise CarrierWave::IntegrityError, "has MIME type mismatch"
|
|
65
67
|
end
|
|
@@ -67,7 +69,11 @@ class ResourceUploader < CarrierWave::Uploader::Base
|
|
|
67
69
|
|
|
68
70
|
private
|
|
69
71
|
|
|
70
|
-
def
|
|
72
|
+
def type_from_content(new_file)
|
|
71
73
|
Marcel::MimeType.for Pathname.new(new_file.path)
|
|
72
74
|
end
|
|
75
|
+
|
|
76
|
+
def type_from_name(new_file)
|
|
77
|
+
Marcel::MimeType.for Pathname.new(new_file.path), name: new_file.filename
|
|
78
|
+
end
|
|
73
79
|
end
|
data/lib/publify_core/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: publify_core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 10.0.
|
|
4
|
+
version: 10.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matijs van Zuijlen
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date:
|
|
14
|
+
date: 2026-10-04 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: aasm
|
|
@@ -1158,6 +1158,7 @@ files:
|
|
|
1158
1158
|
- lib/publify_core/testing_support/fixtures/exploit.svg
|
|
1159
1159
|
- lib/publify_core/testing_support/fixtures/fakepng.png
|
|
1160
1160
|
- lib/publify_core/testing_support/fixtures/just_some.html
|
|
1161
|
+
- lib/publify_core/testing_support/fixtures/like_plain.html
|
|
1161
1162
|
- lib/publify_core/testing_support/fixtures/otherfile.txt
|
|
1162
1163
|
- lib/publify_core/testing_support/fixtures/testfile.jpg
|
|
1163
1164
|
- lib/publify_core/testing_support/fixtures/testfile.png
|
|
@@ -1203,7 +1204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1203
1204
|
- !ruby/object:Gem::Version
|
|
1204
1205
|
version: '0'
|
|
1205
1206
|
requirements: []
|
|
1206
|
-
rubygems_version: 3.
|
|
1207
|
+
rubygems_version: 3.5.22
|
|
1207
1208
|
signing_key:
|
|
1208
1209
|
specification_version: 4
|
|
1209
1210
|
summary: Core engine for the Publify blogging system.
|