alchemy_cms 7.4.10 → 7.4.11

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.

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6bad48bb119901cb52a788e4eff97309b416af2dc7e8a696b82b679f835df987
4
- data.tar.gz: 06f164f3d85053c79f9af5c60e5bcaa8f8bb9398007ed02bf381ce3f192b7e1c
3
+ metadata.gz: 52b2d590102b1bce5b74aa747fdba21f2787e9d7e0c52683f1015b031a1c2a95
4
+ data.tar.gz: f6d443d39b565b16749840b5e4fd96008dc3121625dda35c00383fe1fc120547
5
5
  SHA512:
6
- metadata.gz: 37d2a38d099106c06f14914d8ed1e266b61d0ccb9efd50396e3dd8a9f824d0f802b2341152cd498450acec9643240d1d4f5edc51f735ebbd931edaddb2301996
7
- data.tar.gz: d89e896f9a6a8584e302c41a7507abb59901f32bb5e1895368f4b9c5b52b541d7893dec7e9f13ebb8dd8ec96482139604b7955b84c1c132ca8ef015c74e52328
6
+ metadata.gz: 1a17e8da83f93f6119043c33551ff650cad6b406df35cd0d3d94c7f2d39c0b091280f88ca12b13860aa81dd951115a4d331ffa9397a621359d73c926a4f74882
7
+ data.tar.gz: 49f824b5f3b5ebb98b902e2fd9aac50c1f4449ae2d0b455f4dc897f4b1887edb570c6f5cbc74c6a9b4739c2f7047f4ede2bd9c826fad4bdc2d73abab8cacb208
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.4.11 (2025-10-27)
4
+
5
+ - [7.4-stable] Only sanitize filenames if not nil [#3437](https://github.com/AlchemyCMS/alchemy_cms/pull/3437) ([tvdeyen](https://github.com/tvdeyen))
6
+ - [7.4-stable] Fix elements-editor format validations [#3432](https://github.com/AlchemyCMS/alchemy_cms/pull/3432) ([alchemycms-bot](https://github.com/alchemycms-bot))
7
+
3
8
  ## 7.4.10 (2025-10-02)
4
9
 
5
10
  - [7.4-stable] Fix admin page preview permissions [#3389](https://github.com/AlchemyCMS/alchemy_cms/pull/3389) ([alchemycms-bot](https://github.com/alchemycms-bot))
@@ -158,7 +158,15 @@ module Alchemy
158
158
  end
159
159
 
160
160
  def format_validation
161
- validations.select { _1.is_a?(Hash) }.find { _1[:format] }&.fetch(:format)
161
+ format = validations.select { _1.is_a?(Hash) }.find { _1[:format] }&.fetch(:format)
162
+ return nil unless format
163
+
164
+ # If format is a string or symbol, resolve it from config format_matchers
165
+ if format.is_a?(String) || format.is_a?(Symbol)
166
+ Alchemy::Config.get(:format_matchers)[format.to_sym]
167
+ else
168
+ format
169
+ end
162
170
  end
163
171
 
164
172
  def length_validation
@@ -96,7 +96,7 @@ module Alchemy
96
96
  message: Alchemy.t("not a valid file"),
97
97
  unless: -> { self.class.allowed_filetypes.include?("*") }
98
98
 
99
- before_save :sanitize_file_name
99
+ before_save :sanitize_file_name, if: :file_name
100
100
  before_save :set_name, if: :file_name_changed?
101
101
 
102
102
  scope :with_file_type, ->(file_type) { where(file_mime_type: file_type) }
@@ -94,7 +94,7 @@ module Alchemy
94
94
  end
95
95
  end
96
96
 
97
- before_save :sanitize_image_file_name
97
+ before_save :sanitize_image_file_name, if: :image_file_name
98
98
  # Create important thumbnails upfront
99
99
  after_create -> { PictureThumb.generate_thumbs!(self) if has_convertible_format? }
100
100
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "7.4.10"
4
+ VERSION = "7.4.11"
5
5
 
6
6
  def self.version
7
7
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.4.10
4
+ version: 7.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
@@ -1409,7 +1409,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1409
1409
  version: '0'
1410
1410
  requirements:
1411
1411
  - ImageMagick (libmagick), v6.6 or greater.
1412
- rubygems_version: 3.7.2
1412
+ rubygems_version: 3.6.9
1413
1413
  specification_version: 4
1414
1414
  summary: A powerful, userfriendly and flexible CMS for Rails
1415
1415
  test_files: []