publify_core 11.0.0 → 11.0.2

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: 9ce0abf6a55254193cdc6475dd86481f250201069155275d9178b17f87fb5e9e
4
- data.tar.gz: fe986ec81f387a6bd29a91a7be4d62d7f3655bbd19523ad12c02ba4e1b7cf292
3
+ metadata.gz: 16a87fd4d120dd099f95cf2a12b656ae5f6499f8f00a6ab3508dab3d348265e2
4
+ data.tar.gz: c38df0645ff6406bc290db81d899b3edc0a9e6fa982fad8b0ade600600530e1d
5
5
  SHA512:
6
- metadata.gz: 93aaa5759263e4e8fb3fe8cb56f33e3469a0ed085503e10d6b37c12c6ca45816c56f567424283ea171d8109b0968679b4cebf0fc97c0217db32172dcb095ca1d
7
- data.tar.gz: 1d954da004caa610dd8f306f5c482a415887cde00f9b0a2ad4ea7e2d5ab67ade36bb3f90826071ac101d1f7e7525d435724e5f5bc89cc7ec52c97be19c0573cb
6
+ metadata.gz: cefee755bf83488c84cb9ed7d67c77d6bfb5f93c4645dc62e2d6f7de7e7877be4fce12f4afccdd406cde14e613af5730fec6bdf6926c4c3715e6bad79d8faaaa
7
+ data.tar.gz: 8a80743ba80d26b1673e6f96ce471583ffafab0097de14417b08e7b58281ce230150887dab2c4cef537c0d4d9d6fc2111e79d3e63558fe7f3f3e9fcbd5d49bd3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 11.0.2 / 2026-10-31
4
+
5
+ This release fixes a security issue in the article password checker which could
6
+ expose the contents of unpublished articles.
7
+
8
+ * Only allow password check for published articles ([#275] by [mvz])
9
+
10
+ [#275]: https://github.com/publify/publify_core/pull/275
11
+
12
+ ## 11.0.1 / 2026-10-23
13
+
14
+ This release fixes a security issue where a user with publisher role can update
15
+ any other user's articles.
16
+
17
+ * Support Rails 8.0 ([#270] by [mvz])
18
+ * Update `mini_magick` dependency ([#271] by [mvz])
19
+ * Support Rails 8.1 ([#272] by [mvz])
20
+ * Check user update rights in admin article create action ([#274] by [mvz])
21
+
22
+ [#270]: https://github.com/publify/publify_core/pull/270
23
+ [#271]: https://github.com/publify/publify_core/pull/271
24
+ [#272]: https://github.com/publify/publify_core/pull/272
25
+ [#274]: https://github.com/publify/publify_core/pull/274
26
+
3
27
  ## 11.0.0 / 2026-10-04
4
28
 
5
29
  This major release updates Rails to version 7.2, and updates supported Ruby
@@ -37,7 +37,10 @@ class Admin::ArticlesController < Admin::BaseController
37
37
 
38
38
  def create
39
39
  article_factory = Article::Factory.new(this_blog, current_user)
40
- @article = article_factory.get_or_build_from(params[:article][:id])
40
+ id = params[:article][:id].presence
41
+ return if id && !access_granted?(id)
42
+
43
+ @article = article_factory.get_or_build_from(id)
41
44
 
42
45
  update_article_attributes
43
46
 
@@ -67,8 +67,13 @@ class ArticlesController < ContentController
67
67
  def check_password
68
68
  return unless request.xhr?
69
69
 
70
- @article = Article.find(params[:article][:id])
71
- if @article.password == params[:article][:password]
70
+ form_params = params.require(:article).permit(:id, :password)
71
+
72
+ @article = this_blog.published_articles.find(form_params[:id])
73
+ expected = @article.password
74
+ actual = form_params[:password]
75
+
76
+ if ActiveSupport::SecurityUtils.secure_compare(expected, actual)
72
77
  render partial: "articles/full_article_content", locals: { article: @article }
73
78
  else
74
79
  render partial: "articles/password_form", locals: { article: @article }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PublifyCore
4
- VERSION = "11.0.0"
4
+ VERSION = "11.0.2"
5
5
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ namespace :appraisal do
4
+ desc "Check appraisals"
5
+ task :check do
6
+ Appraisal::AppraisalFile.each do |appraisal|
7
+ existing = File.read(appraisal.gemfile_path)
8
+ signature = Appraisal::Customize.heading || "This file was generated by Appraisal"
9
+ header = appraisal.send :comment_lines, signature
10
+ body = appraisal.send :quoted_gemfile
11
+ expected = [header, body].join("\n\n")
12
+ raise "Outdated appraisal: #{appraisal.name}" unless existing.chomp == expected.chomp
13
+ end
14
+ end
15
+ end
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: 11.0.0
4
+ version: 11.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matijs van Zuijlen
@@ -278,20 +278,14 @@ dependencies:
278
278
  requirements:
279
279
  - - "~>"
280
280
  - !ruby/object:Gem::Version
281
- version: '4.9'
282
- - - ">="
283
- - !ruby/object:Gem::Version
284
- version: 4.9.4
281
+ version: '5.4'
285
282
  type: :runtime
286
283
  prerelease: false
287
284
  version_requirements: !ruby/object:Gem::Requirement
288
285
  requirements:
289
286
  - - "~>"
290
287
  - !ruby/object:Gem::Version
291
- version: '4.9'
292
- - - ">="
293
- - !ruby/object:Gem::Version
294
- version: 4.9.4
288
+ version: '5.4'
295
289
  - !ruby/object:Gem::Dependency
296
290
  name: nokogiri
297
291
  requirement: !ruby/object:Gem::Requirement
@@ -329,7 +323,7 @@ dependencies:
329
323
  version: 7.1.0
330
324
  - - "<"
331
325
  - !ruby/object:Gem::Version
332
- version: '8.0'
326
+ version: '8.2'
333
327
  type: :runtime
334
328
  prerelease: false
335
329
  version_requirements: !ruby/object:Gem::Requirement
@@ -339,7 +333,7 @@ dependencies:
339
333
  version: 7.1.0
340
334
  - - "<"
341
335
  - !ruby/object:Gem::Version
342
- version: '8.0'
336
+ version: '8.2'
343
337
  - !ruby/object:Gem::Dependency
344
338
  name: rails_autolink
345
339
  requirement: !ruby/object:Gem::Requirement
@@ -882,6 +876,7 @@ files:
882
876
  - lib/sidebar_field.rb
883
877
  - lib/sidebar_registry.rb
884
878
  - lib/spam_protection.rb
879
+ - lib/tasks/appraisal.rake
885
880
  - lib/tasks/publify_core_tasks.rake
886
881
  - lib/text_filter_plugin.rb
887
882
  - lib/theme.rb
@@ -908,7 +903,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
908
903
  - !ruby/object:Gem::Version
909
904
  version: '0'
910
905
  requirements: []
911
- rubygems_version: 4.0.22
906
+ rubygems_version: 4.0.23
912
907
  specification_version: 4
913
908
  summary: Core engine for the Publify blogging system.
914
909
  test_files: []