publify_core 10.0.4 → 11.0.1

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.
Files changed (201) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +258 -53
  3. data/app/assets/javascripts/publify.js +0 -1
  4. data/app/assets/javascripts/publify_admin.js +10 -9
  5. data/app/assets/stylesheets/accounts.css.scss +0 -2
  6. data/app/assets/stylesheets/administration_structure.css.scss +0 -4
  7. data/app/assets/stylesheets/publify.css.scss +0 -1
  8. data/app/assets/stylesheets/publify_admin.css.scss +0 -2
  9. data/app/assets/stylesheets/sidebar_admin.css.scss +0 -6
  10. data/app/controllers/admin/articles_controller.rb +5 -2
  11. data/app/controllers/admin/base_controller.rb +2 -2
  12. data/app/controllers/admin/redirects_controller.rb +2 -2
  13. data/app/controllers/admin/resources_controller.rb +1 -1
  14. data/app/controllers/admin/seo_controller.rb +2 -2
  15. data/app/controllers/admin/settings_controller.rb +2 -2
  16. data/app/controllers/admin/tags_controller.rb +1 -1
  17. data/app/controllers/admin/users_controller.rb +2 -2
  18. data/app/controllers/articles_controller.rb +2 -5
  19. data/app/controllers/authors_controller.rb +0 -2
  20. data/app/controllers/comments_controller.rb +5 -2
  21. data/app/controllers/content_controller.rb +0 -4
  22. data/app/controllers/notes_controller.rb +1 -6
  23. data/app/controllers/setup_controller.rb +1 -1
  24. data/app/controllers/tags_controller.rb +0 -1
  25. data/app/controllers/users/registrations_controller.rb +1 -0
  26. data/app/helpers/admin/base_helper.rb +20 -13
  27. data/app/helpers/admin/feedback_helper.rb +4 -4
  28. data/app/helpers/base_helper.rb +10 -6
  29. data/app/helpers/xml_helper.rb +4 -0
  30. data/app/models/article.rb +7 -7
  31. data/app/models/blog.rb +3 -3
  32. data/app/models/comment.rb +1 -1
  33. data/app/models/config_manager.rb +1 -3
  34. data/app/models/content.rb +4 -5
  35. data/app/models/content_base.rb +4 -3
  36. data/app/models/feedback.rb +1 -1
  37. data/app/models/note.rb +74 -8
  38. data/app/models/page.rb +1 -1
  39. data/app/models/redirect.rb +0 -4
  40. data/app/models/resource.rb +1 -0
  41. data/app/models/sidebar.rb +6 -14
  42. data/app/models/tag.rb +2 -2
  43. data/app/models/text_filter.rb +2 -2
  44. data/app/models/trigger.rb +1 -1
  45. data/app/models/user.rb +12 -21
  46. data/app/uploaders/resource_uploader.rb +1 -0
  47. data/app/views/admin/articles/_form.html.erb +99 -105
  48. data/app/views/admin/articles/index.html.erb +15 -23
  49. data/app/views/admin/dashboard/_comment.html.erb +1 -1
  50. data/app/views/admin/dashboard/_comments.html.erb +4 -6
  51. data/app/views/admin/dashboard/_drafts.html.erb +4 -6
  52. data/app/views/admin/dashboard/_overview.html.erb +2 -5
  53. data/app/views/admin/dashboard/_welcome.html.erb +19 -19
  54. data/app/views/admin/dashboard/index.html.erb +3 -3
  55. data/app/views/admin/feedback/_button.html.erb +7 -13
  56. data/app/views/admin/feedback/article.html.erb +17 -17
  57. data/app/views/admin/feedback/edit.html.erb +17 -21
  58. data/app/views/admin/feedback/index.html.erb +8 -8
  59. data/app/views/admin/notes/_form.html.erb +5 -5
  60. data/app/views/admin/notes/_list.html.erb +1 -1
  61. data/app/views/admin/notes/_note.html.erb +1 -1
  62. data/app/views/admin/notes/edit.html.erb +1 -1
  63. data/app/views/admin/notes/index.html.erb +1 -1
  64. data/app/views/admin/pages/_form.html.erb +23 -27
  65. data/app/views/admin/post_types/_index_and_form.html.erb +5 -5
  66. data/app/views/admin/redirects/_index_and_form.html.erb +2 -2
  67. data/app/views/admin/resources/index.html.erb +20 -8
  68. data/app/views/admin/seo/_general.html.erb +36 -36
  69. data/app/views/admin/seo/_permalinks.html.erb +22 -14
  70. data/app/views/admin/seo/_titles.html.erb +63 -63
  71. data/app/views/admin/settings/display.html.erb +23 -23
  72. data/app/views/admin/settings/feedback.html.erb +29 -29
  73. data/app/views/admin/settings/index.html.erb +21 -21
  74. data/app/views/admin/settings/write.html.erb +18 -18
  75. data/app/views/admin/shared/_flash.html.erb +6 -0
  76. data/app/views/admin/shared/_menu.html.erb +56 -68
  77. data/app/views/admin/sidebar/_config.html.erb +15 -19
  78. data/app/views/admin/sidebar/_target.html.erb +3 -3
  79. data/app/views/admin/sidebar/_target_sidebar.html.erb +14 -13
  80. data/app/views/admin/sidebar/index.html.erb +2 -2
  81. data/app/views/admin/tags/_index_and_form.html.erb +3 -3
  82. data/app/views/admin/themes/index.html.erb +21 -19
  83. data/app/views/admin/users/_form.html.erb +79 -79
  84. data/app/views/articles/search.html.erb +1 -1
  85. data/app/views/layouts/accounts.html.erb +7 -9
  86. data/app/views/layouts/administration.html.erb +2 -2
  87. data/app/views/notes/show.html.erb +15 -0
  88. data/app/views/setup/index.html.erb +1 -1
  89. data/app/views/shared/_atom_item_article.atom.builder +1 -3
  90. data/app/views/shared/_rss_item_article.rss.builder +1 -2
  91. data/config/i18n-tasks.yml +0 -1
  92. data/config/locales/ar.yml +3 -2
  93. data/config/locales/da.yml +3 -2
  94. data/config/locales/de.yml +3 -2
  95. data/config/locales/en.yml +3 -2
  96. data/config/locales/es-MX.yml +3 -2
  97. data/config/locales/fr.yml +3 -2
  98. data/config/locales/he.yml +3 -2
  99. data/config/locales/it.yml +3 -2
  100. data/config/locales/ja.yml +3 -2
  101. data/config/locales/lt.yml +3 -2
  102. data/config/locales/nb.yml +3 -2
  103. data/config/locales/nl.yml +3 -2
  104. data/config/locales/pl.yml +3 -2
  105. data/config/locales/pt-BR.yml +3 -2
  106. data/config/locales/ro.yml +3 -2
  107. data/config/locales/ru.yml +3 -2
  108. data/config/locales/zh-CN.yml +3 -2
  109. data/config/locales/zh-TW.yml +3 -2
  110. data/config/routes.rb +0 -11
  111. data/db/migrate/114_fixes_buggy_articles_and_notes.rb +2 -2
  112. data/db/migrate/20150807134129_simplify_redirect_relations.rb +1 -1
  113. data/db/migrate/20160605154632_remove_profiles.rb +1 -1
  114. data/db/migrate/20190208152646_move_text_filter_to_name.rb +2 -2
  115. data/lib/format.rb +2 -2
  116. data/lib/publify_core/engine.rb +10 -0
  117. data/lib/publify_core/string_ext.rb +1 -13
  118. data/lib/publify_core/text_filter/markdown.rb +5 -1
  119. data/lib/publify_core/text_filter/markdown_smartquotes.rb +6 -1
  120. data/lib/publify_core/version.rb +1 -1
  121. data/lib/publify_core.rb +2 -2
  122. data/lib/tasks/appraisal.rake +15 -0
  123. data/lib/text_filter_plugin.rb +20 -22
  124. data/lib/theme.rb +56 -37
  125. metadata +103 -405
  126. data/app/assets/javascripts/bootstrap/affix.js +0 -164
  127. data/app/assets/javascripts/bootstrap/alert.js +0 -95
  128. data/app/assets/javascripts/bootstrap/button.js +0 -125
  129. data/app/assets/javascripts/bootstrap/collapse.js +0 -212
  130. data/app/assets/javascripts/bootstrap/dropdown.js +0 -165
  131. data/app/assets/javascripts/bootstrap/modal.js +0 -358
  132. data/app/assets/javascripts/bootstrap/tab.js +0 -155
  133. data/app/assets/javascripts/bootstrap/transition.js +0 -59
  134. data/app/assets/javascripts/bootstrap-sprockets.js +0 -8
  135. data/app/assets/javascripts/lightbox.js +0 -350
  136. data/app/assets/stylesheets/_bootstrap-compass.scss +0 -9
  137. data/app/assets/stylesheets/_bootstrap-mincer.scss +0 -19
  138. data/app/assets/stylesheets/_bootstrap-sprockets.scss +0 -9
  139. data/app/assets/stylesheets/_bootstrap.scss +0 -42
  140. data/app/assets/stylesheets/bootstrap/_alerts.scss +0 -73
  141. data/app/assets/stylesheets/bootstrap/_button-groups.scss +0 -242
  142. data/app/assets/stylesheets/bootstrap/_buttons.scss +0 -168
  143. data/app/assets/stylesheets/bootstrap/_close.scss +0 -37
  144. data/app/assets/stylesheets/bootstrap/_code.scss +0 -69
  145. data/app/assets/stylesheets/bootstrap/_component-animations.scss +0 -38
  146. data/app/assets/stylesheets/bootstrap/_dropdowns.scss +0 -213
  147. data/app/assets/stylesheets/bootstrap/_forms.scss +0 -586
  148. data/app/assets/stylesheets/bootstrap/_grid.scss +0 -94
  149. data/app/assets/stylesheets/bootstrap/_labels.scss +0 -66
  150. data/app/assets/stylesheets/bootstrap/_media.scss +0 -66
  151. data/app/assets/stylesheets/bootstrap/_mixins.scss +0 -37
  152. data/app/assets/stylesheets/bootstrap/_modals.scss +0 -150
  153. data/app/assets/stylesheets/bootstrap/_navbar.scss +0 -479
  154. data/app/assets/stylesheets/bootstrap/_navs.scss +0 -242
  155. data/app/assets/stylesheets/bootstrap/_normalize.scss +0 -427
  156. data/app/assets/stylesheets/bootstrap/_pagination.scss +0 -86
  157. data/app/assets/stylesheets/bootstrap/_panels.scss +0 -222
  158. data/app/assets/stylesheets/bootstrap/_print.scss +0 -99
  159. data/app/assets/stylesheets/bootstrap/_scaffolding.scss +0 -160
  160. data/app/assets/stylesheets/bootstrap/_tables.scss +0 -234
  161. data/app/assets/stylesheets/bootstrap/_theme.scss +0 -224
  162. data/app/assets/stylesheets/bootstrap/_type.scss +0 -296
  163. data/app/assets/stylesheets/bootstrap/_utilities.scss +0 -55
  164. data/app/assets/stylesheets/bootstrap/_variables.scss +0 -638
  165. data/app/assets/stylesheets/bootstrap/_wells.scss +0 -29
  166. data/app/assets/stylesheets/bootstrap/mixins/_alerts.scss +0 -15
  167. data/app/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -12
  168. data/app/assets/stylesheets/bootstrap/mixins/_border-radius.scss +0 -18
  169. data/app/assets/stylesheets/bootstrap/mixins/_buttons.scss +0 -56
  170. data/app/assets/stylesheets/bootstrap/mixins/_center-block.scss +0 -7
  171. data/app/assets/stylesheets/bootstrap/mixins/_clearfix.scss +0 -22
  172. data/app/assets/stylesheets/bootstrap/mixins/_forms.scss +0 -82
  173. data/app/assets/stylesheets/bootstrap/mixins/_gradients.scss +0 -56
  174. data/app/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -81
  175. data/app/assets/stylesheets/bootstrap/mixins/_grid.scss +0 -122
  176. data/app/assets/stylesheets/bootstrap/mixins/_hide-text.scss +0 -21
  177. data/app/assets/stylesheets/bootstrap/mixins/_image.scss +0 -28
  178. data/app/assets/stylesheets/bootstrap/mixins/_labels.scss +0 -12
  179. data/app/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -10
  180. data/app/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +0 -9
  181. data/app/assets/stylesheets/bootstrap/mixins/_opacity.scss +0 -7
  182. data/app/assets/stylesheets/bootstrap/mixins/_pagination.scss +0 -24
  183. data/app/assets/stylesheets/bootstrap/mixins/_panels.scss +0 -20
  184. data/app/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +0 -8
  185. data/app/assets/stylesheets/bootstrap/mixins/_resize.scss +0 -6
  186. data/app/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +0 -17
  187. data/app/assets/stylesheets/bootstrap/mixins/_size.scss +0 -10
  188. data/app/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +0 -9
  189. data/app/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -28
  190. data/app/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -12
  191. data/app/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +0 -8
  192. data/app/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +0 -222
  193. data/app/assets/stylesheets/lightbox.css +0 -63
  194. data/app/controllers/theme_controller.rb +0 -63
  195. data/app/views/notes/show_in_reply.html.erb +0 -18
  196. data/app/views/theme/static_view_test.html.erb +0 -1
  197. data/lib/publify_core/text_filter/twitterfilter.rb +0 -55
  198. data/lib/tasks/manifest.rake +0 -30
  199. /data/app/views/layouts/{default.html.erb → application.html.erb} +0 -0
  200. /data/themes/plain/javascripts/{theme.js → plain/theme.js} +0 -0
  201. /data/themes/plain/stylesheets/{theme.css → plain/theme.css} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb863f2b83b8da8700912e96e0c744d024e7a3e4ffa362d9ad935f058ce9e9a5
4
- data.tar.gz: 49608e62a576f90c263501a080e78aa54aa9c46277ef49e8d7fbde9af7891ca4
3
+ metadata.gz: 54204326dfdc03206645e1fd7500d9bfa643d6dda4322ac507f274cb5f54f6f4
4
+ data.tar.gz: 707f57d3ee216361b5c8609dca39d9530a1028d88a7ad6074ada18ce54161339
5
5
  SHA512:
6
- metadata.gz: d5d506b38f535284cc378b38d22afc611036ababfc81a5c8be05afe6736128fc76f6dd3639997ee7a7b3180e27d4071ab07cf1c5f69ad4c8f90093a384f0e94b
7
- data.tar.gz: a1fa53f2e4d0ceffc96b32f67961cb23b09806c4ded69bdba2fffbcad4dbd4198694b2f145fb6a4971f9e4bfd7ce7c6edd1a0ef1347af5245739519be3676324
6
+ metadata.gz: 5f605221ed9190fa5cf50af34c8f0cde8d328bc5390a36fb251953d599b6ee2b307e6238a9d1f53379d87308562f33fb6d2bd2074afe5dcbb5096c6e727d0813
7
+ data.tar.gz: 43abbedcaa37557670340fbd8d6304404b758d1b860f62594b03ab48e4ee2278cbc1b197de224db29cb75b71a4232e4dd7439a7551603eff21b1efb31aef79de
data/CHANGELOG.md CHANGED
@@ -1,5 +1,182 @@
1
1
  # Changelog
2
2
 
3
+ ## 11.0.1 / 2026-10-23
4
+
5
+ This release fixes a security issue where a user with publisher role can update
6
+ any other user's articles.
7
+
8
+ * Support Rails 8.0 ([#270] by [mvz])
9
+ * Update `mini_magick` dependency ([#271] by [mvz])
10
+ * Support Rails 8.1 ([#272] by [mvz])
11
+ * Check user update rights in admin article create action ([#274] by [mvz])
12
+
13
+ [#270]: https://github.com/publify/publify_core/pull/270
14
+ [#271]: https://github.com/publify/publify_core/pull/271
15
+ [#272]: https://github.com/publify/publify_core/pull/272
16
+ [#274]: https://github.com/publify/publify_core/pull/274
17
+
18
+ ## 11.0.0 / 2026-10-04
19
+
20
+ This major release updates Rails to version 7.2, and updates supported Ruby
21
+ versions to 3.2 through 4.0. It also includes breaking changes to theming
22
+ support.
23
+
24
+ ### Security
25
+
26
+ * Refuse attempts to upload a file detected as text with an html extension ([#268] by [mvz])
27
+
28
+ ### Ruby support
29
+
30
+ PublifyCore 11.0 supports Ruby 3.2 through 4.0, dropping support for older versions:
31
+
32
+ * Support Ruby 3.0 and up ([#136] by [mvz])
33
+ * Add Ruby 3.4 to the GitHub Actions matrix ([#167] by [mvz])
34
+ * Drop support for Ruby 3.0 and 3.1 ([#189] by [mvz])
35
+ * Test with Ruby 4.0 in CI ([#221] by [mvz])
36
+
37
+ ### Rails support
38
+
39
+ PublifyCore 11.0 supports Rails 7.1 and 7.2:
40
+
41
+ * Drop support for Rails 6.1 ([#195] by [mvz])
42
+ * Set explicit coder for serialized attributes ([#198] by [mvz])
43
+ * Support Rails 7.2 ([#261] by [mvz])
44
+ * Handle Rails 7.1 deprecation warnings ([#222] by [mvz])
45
+ * Drop support for Rails 7.0 ([#215] by [mvz])
46
+ * Make old migration work with Postgres in Rails 7.2 ([#262] by [mvz])
47
+
48
+ ### Theming
49
+
50
+ This release includes breaking changes to theming. Themes must now use the
51
+ default Rails layout name, `application`. All theme assets are served via the
52
+ asset pipeline. To avoid asset name conflicts, themes must namespace their
53
+ assets with the theme name.
54
+
55
+ For example for a theme named 'foo', this results in the following setup:
56
+
57
+ * Layout in `themes/foo/views/layouts/application.html.erb`
58
+ * In the layout, links to style sheets and javascript files that automatically
59
+ prefix the theme name:
60
+
61
+ ```erb
62
+ <%= themeable_stylesheet_link_tag :theme %>
63
+ <%= themeable_javascript_include_tag :theme %>
64
+ ```
65
+
66
+ * Asset files:
67
+ * `themes/foo/javascripts/foo/theme.js`
68
+ * `themes/foo/stylesheets/foo/theme.css`
69
+
70
+ Related pull requests:
71
+
72
+ * Simplify derivation of a theme's name from its path ([#240] by [mvz])
73
+ * Remove translation only used in Typographic theme ([#245] by [mvz])
74
+ * Always use the standard Rails layout name for the content pages ([#244] by [mvz])
75
+ * Use the asset pipeline for theme assets ([#247] by [mvz])
76
+
77
+ ### Dependencies
78
+
79
+ * Port Admin views to Bootstrap 4 ([#178] by [mvz])
80
+ * Upgrade to commonmarker version 2.3 ([#193] by [mvz])
81
+ * Upgrade to bootstrap 5.3 ([#234] by [mvz])
82
+ * Update Devise to version 5.0.4 ([#226] by [mvz])
83
+
84
+ ### Miscellaneous
85
+
86
+ * Upgrade `html_pipeline` to version 3.2 and port custom filters ([#211] by [mvz])
87
+ * Replace `devise_zxcvbn` with direct integration of `zxcvbn` ([#217] by [mvz])
88
+ * Add specs for `ContentBase#excerpt_text` ([#228] by [mvz])
89
+ * Remove monkey-patched `String#strip_html` method ([#231] by [mvz])
90
+ * Clean up deprecations ([#233] by [mvz])
91
+ * Remove EkkoLightbox ([#235] by [mvz])
92
+ * Remove old password fallback mechanism ([#236] by [mvz])
93
+ * Clean up textfilter macro methods ([#238] by [mvz])
94
+ * Replace ad-hoc excerpt code with `#excerpt_text` ([#239] by [mvz])
95
+ * Remove useless `Redirect#to_url` method ([#252] by [mvz])
96
+ * Remove html tags the Rails way when generating permalinks ([#249] by [mvz])
97
+
98
+ ### Internal
99
+
100
+ * Allow starting the GitHub Actions workflow manually ([#140] by [mvz])
101
+ * Pull in latest changes from 10-0-stable ([#164] by [mvz])
102
+ * Pull in latest changes from 10-0-stable ([#152] by [mvz])
103
+ * Fix linting job in GitHub Actions ([#158] by [mvz])
104
+ * Provide needed graphics processing dependency in CI ([#169] by [mvz])
105
+ * Test with all supported Rails versions in CI ([#168] by [mvz])
106
+ * Use rake-manifest to generate the manifest ([#170] by [mvz])
107
+ * Prevent manifest task definition from being loaded in dependent projects
108
+ ([11727f5] by [mvz])
109
+ * Update RuboCop dependencies and configuration and fix new offenses ([#173] by [mvz])
110
+ * Clarify logic in `CommentsController#recaptcha_ok_for?` ([#174] by [mvz])
111
+ * Switch to weekly dependabot updates ([#188] by [mvz])
112
+ * Use new official name for `erb_lint` ([#190] by [mvz])
113
+ * Remove scheduled CI runs ([#204] by [mvz])
114
+ * Pull in changelog for version 10.0.3 ([#194] by [mvz])
115
+ * Remove obsolete `before_action` ([#196] by [mvz])
116
+ * Remove exceptions from `login_required` before_action ([#197] by [mvz])
117
+ * Refactor notes rendering ([#210] by [mvz])
118
+ * Remove any permissions from `GITHUB_TOKEN` in CI ([#253] by [mvz])
119
+ * Remove dummy application layout view ([#246] by [mvz])
120
+ * Make 'rails server' work with the dummy test app ([#216] by [mvz])
121
+ * Update rubocop dependencies and handle new offenses ([#223] by [mvz])
122
+ * Remove dependency on pry ([#165] by [mvz])
123
+ * Loosen development dependencies ([#266] by [mvz])
124
+
125
+ [#136]: https://github.com/publify/publify_core/pull/136
126
+ [#140]: https://github.com/publify/publify_core/pull/140
127
+ [#152]: https://github.com/publify/publify_core/pull/152
128
+ [#158]: https://github.com/publify/publify_core/pull/158
129
+ [#164]: https://github.com/publify/publify_core/pull/164
130
+ [#165]: https://github.com/publify/publify_core/pull/165
131
+ [#167]: https://github.com/publify/publify_core/pull/167
132
+ [#168]: https://github.com/publify/publify_core/pull/168
133
+ [#169]: https://github.com/publify/publify_core/pull/169
134
+ [#170]: https://github.com/publify/publify_core/pull/170
135
+ [#173]: https://github.com/publify/publify_core/pull/173
136
+ [#174]: https://github.com/publify/publify_core/pull/174
137
+ [#178]: https://github.com/publify/publify_core/pull/178
138
+ [#188]: https://github.com/publify/publify_core/pull/188
139
+ [#189]: https://github.com/publify/publify_core/pull/189
140
+ [#190]: https://github.com/publify/publify_core/pull/190
141
+ [#193]: https://github.com/publify/publify_core/pull/193
142
+ [#194]: https://github.com/publify/publify_core/pull/194
143
+ [#195]: https://github.com/publify/publify_core/pull/195
144
+ [#196]: https://github.com/publify/publify_core/pull/196
145
+ [#197]: https://github.com/publify/publify_core/pull/197
146
+ [#198]: https://github.com/publify/publify_core/pull/198
147
+ [#204]: https://github.com/publify/publify_core/pull/204
148
+ [#210]: https://github.com/publify/publify_core/pull/210
149
+ [#211]: https://github.com/publify/publify_core/pull/211
150
+ [#215]: https://github.com/publify/publify_core/pull/215
151
+ [#216]: https://github.com/publify/publify_core/pull/216
152
+ [#217]: https://github.com/publify/publify_core/pull/217
153
+ [#221]: https://github.com/publify/publify_core/pull/221
154
+ [#222]: https://github.com/publify/publify_core/pull/222
155
+ [#223]: https://github.com/publify/publify_core/pull/223
156
+ [#226]: https://github.com/publify/publify_core/pull/226
157
+ [#228]: https://github.com/publify/publify_core/pull/228
158
+ [#231]: https://github.com/publify/publify_core/pull/231
159
+ [#233]: https://github.com/publify/publify_core/pull/233
160
+ [#234]: https://github.com/publify/publify_core/pull/234
161
+ [#235]: https://github.com/publify/publify_core/pull/235
162
+ [#236]: https://github.com/publify/publify_core/pull/236
163
+ [#238]: https://github.com/publify/publify_core/pull/238
164
+ [#239]: https://github.com/publify/publify_core/pull/239
165
+ [#240]: https://github.com/publify/publify_core/pull/240
166
+ [#244]: https://github.com/publify/publify_core/pull/244
167
+ [#245]: https://github.com/publify/publify_core/pull/245
168
+ [#246]: https://github.com/publify/publify_core/pull/246
169
+ [#247]: https://github.com/publify/publify_core/pull/247
170
+ [#249]: https://github.com/publify/publify_core/pull/249
171
+ [#252]: https://github.com/publify/publify_core/pull/252
172
+ [#253]: https://github.com/publify/publify_core/pull/253
173
+ [#261]: https://github.com/publify/publify_core/pull/261
174
+ [#262]: https://github.com/publify/publify_core/pull/262
175
+ [#266]: https://github.com/publify/publify_core/pull/266
176
+ [#268]: https://github.com/publify/publify_core/pull/268
177
+
178
+ [11727f5]: https://github.com/publify/publify_core/commit/11727f5a2826ea351964c2367d36a979dfab212d
179
+
3
180
  ## 10.0.4 / 2026-10-04
4
181
 
5
182
  * Refuse attempts to upload a file detected as text with an html extension ([#267] by [mvz])
@@ -84,60 +261,88 @@
84
261
 
85
262
  ### Breaking changes
86
263
 
87
- * Remove support for Textile as a text format [publify#1001](https://github.com/publify/publify/pull/1001)
264
+ * Remove support for Textile as a text format
265
+ [publify#1001](https://github.com/publify/publify/pull/1001)
88
266
 
89
267
  ### Other changes
90
268
 
91
269
  * Improve feedback listings [publify#1005](https://github.com/publify/publify/pull/1005)
92
- * Link to article from article feedback admin page [publify#1007](https://github.com/publify/publify/pull/1007)
270
+ * Link to article from article feedback admin page
271
+ [publify#1007](https://github.com/publify/publify/pull/1007)
93
272
  * Link to blog from admin menu [publify#1008](https://github.com/publify/publify/pull/1008)
94
- * Handle markdown links in notes correctly [publify#1009](https://github.com/publify/publify/pull/1009)
95
- * Make notes twitterfilter robust [publify#1010](https://github.com/publify/publify/pull/1010)
273
+ * Handle markdown links in notes correctly
274
+ [publify#1009](https://github.com/publify/publify/pull/1009)
275
+ * Make notes twitterfilter robust
276
+ [publify#1010](https://github.com/publify/publify/pull/1010)
96
277
  * Miscellaneous admin fixes [publify#1012](https://github.com/publify/publify/pull/1012)
97
- * Add arabic language to the project [publify#1060](https://github.com/publify/publify/pull/1060) by [ahmedhamid13](https://github.com/ahmedhamid13)
278
+ * Add arabic language to the project
279
+ [publify#1060](https://github.com/publify/publify/pull/1060) by [ahmedhamid13](https://github.com/ahmedhamid13)
98
280
 
99
281
  ### Internal changes
100
282
 
101
283
  * Remove use of 'notextile' [publify#1002](https://github.com/publify/publify/pull/1002)
102
- * Remove `TextFilter.filter_text` in favor of `#filter_text` [publify#1003](https://github.com/publify/publify/pull/1003)
103
- * Replace BlueCloth with CommonMarker for Markdown processing [publify#810](https://github.com/publify/publify/pull/810)
104
- * Rename Admin::ContentController to Admin::ArticlesController [publify#1004](https://github.com/publify/publify/pull/1004)
105
- * Remove unneeded wrapping elements from admin layout [publify#1006](https://github.com/publify/publify/pull/1006)
106
- * Split the factories into individual files [publify#1031](https://github.com/publify/publify/pull/1031) by [VictorPS](https://github.com/VictorPS)
107
- * Ensure `auto_link` helper is loaded on time [publify#1040](https://github.com/publify/publify/pull/1040)
108
- * Remove `sitealizer` table [publify#1089](https://github.com/publify/publify/pull/1089) by [SupriyaMedankar](https://github.com/SupriyaMedankar)
109
- * Remove itunes fields from resources [publify#1092](https://github.com/publify/publify/pull/1092) by [SupriyaMedankar](https://github.com/SupriyaMedankar)
110
- * Remove `page_caches` table [publify#1090](https://github.com/publify/publify/pull/1090) by [SupriyaMedankar](https://github.com/SupriyaMedankar)
111
- * Remove obsolete Sidebar code [publify_core#58](https://github.com/publify/publify_core/pull/58)
284
+ * Remove `TextFilter.filter_text` in favor of `#filter_text`
285
+ [publify#1003](https://github.com/publify/publify/pull/1003)
286
+ * Replace BlueCloth with CommonMarker for Markdown processing
287
+ [publify#810](https://github.com/publify/publify/pull/810)
288
+ * Rename Admin::ContentController to Admin::ArticlesController
289
+ [publify#1004](https://github.com/publify/publify/pull/1004)
290
+ * Remove unneeded wrapping elements from admin layout
291
+ [publify#1006](https://github.com/publify/publify/pull/1006)
292
+ * Split the factories into individual files
293
+ [publify#1031](https://github.com/publify/publify/pull/1031) by [VictorPS](https://github.com/VictorPS)
294
+ * Ensure `auto_link` helper is loaded on time
295
+ [publify#1040](https://github.com/publify/publify/pull/1040)
296
+ * Remove `sitealizer` table
297
+ [publify#1089](https://github.com/publify/publify/pull/1089) by [SupriyaMedankar](https://github.com/SupriyaMedankar)
298
+ * Remove itunes fields from resources
299
+ [publify#1092](https://github.com/publify/publify/pull/1092) by [SupriyaMedankar](https://github.com/SupriyaMedankar)
300
+ * Remove `page_caches` table
301
+ [publify#1090](https://github.com/publify/publify/pull/1090) by [SupriyaMedankar](https://github.com/SupriyaMedankar)
302
+ * Remove obsolete Sidebar code
303
+ [publify_core#58](https://github.com/publify/publify_core/pull/58)
112
304
 
113
305
  ## 9.2.10 / 2023-01-08
114
306
 
115
307
  * Bump Rails version to 5.2.8.1 [publify#1070](https://github.com/publify/publify/pull/1070)
116
- * Limit length of settings values [publify#1072](https://github.com/publify/publify/pull/1072)
117
- * Require login to stay unique when updating a User [publify#1073](https://github.com/publify/publify/pull/1073)
118
- * Validate lengths of string attributes [publify#1077](https://github.com/publify/publify/pull/1077)
119
- * Strip EXIF data from resource uploads [publify#1078](https://github.com/publify/publify/pull/1078)
120
- * Require user passwords to be strong [publify#1086](https://github.com/publify/publify/pull/1086)
308
+ * Limit length of settings values
309
+ [publify#1072](https://github.com/publify/publify/pull/1072)
310
+ * Require login to stay unique when updating a User
311
+ [publify#1073](https://github.com/publify/publify/pull/1073)
312
+ * Validate lengths of string attributes
313
+ [publify#1077](https://github.com/publify/publify/pull/1077)
314
+ * Strip EXIF data from resource uploads
315
+ [publify#1078](https://github.com/publify/publify/pull/1078)
316
+ * Require user passwords to be strong
317
+ [publify#1086](https://github.com/publify/publify/pull/1086)
121
318
 
122
319
  ## 9.2.9 / 2022-05-22
123
320
 
124
- * Fix admin article access control [publify#1065](https://github.com/publify/publify/pull/1065)
125
- * Refuse html files as resources even if declared to be plain text [publify#1066](https://github.com/publify/publify/pull/1066)
321
+ * Fix admin article access control
322
+ [publify#1065](https://github.com/publify/publify/pull/1065)
323
+ * Refuse html files as resources even if declared to be plain text
324
+ [publify#1066](https://github.com/publify/publify/pull/1066)
126
325
 
127
326
  ## 9.2.8 / 2022-05-14
128
327
 
129
- * Fix password protected article reveal [publify#1049](https://github.com/publify/publify/pull/1049)
130
- * Disallow comments on draft articles [publify#1048](https://github.com/publify/publify/pull/1048)
328
+ * Fix password protected article reveal
329
+ [publify#1049](https://github.com/publify/publify/pull/1049)
330
+ * Disallow comments on draft articles
331
+ [publify#1048](https://github.com/publify/publify/pull/1048)
131
332
  * Clean up Feedback validation [publify#1051](https://github.com/publify/publify/pull/1051)
132
333
  * Disallow images in comments [publify#1054](https://github.com/publify/publify/pull/1054)
133
334
  * Fix password reset process [publify#1055](https://github.com/publify/publify/pull/1055)
134
- * Hide bodies of password-protected articles in search results [publify#1057](https://github.com/publify/publify/pull/1057)
135
- * Provide correct `article_id` input in bulkops form [publify#1058](https://github.com/publify/publify/pull/1058)
136
- * Do not create article meta description for password-protected articles [publify#1061](https://github.com/publify/publify/pull/1061)
335
+ * Hide bodies of password-protected articles in search results
336
+ [publify#1057](https://github.com/publify/publify/pull/1057)
337
+ * Provide correct `article_id` input in bulkops form
338
+ [publify#1058](https://github.com/publify/publify/pull/1058)
339
+ * Do not create article meta description for password-protected articles
340
+ [publify#1061](https://github.com/publify/publify/pull/1061)
137
341
 
138
342
  ## 9.2.7 / 2022-02-07
139
343
 
140
- * Fix setting the article password from the Admin [publify#1044](https://github.com/publify/publify/pull/1044)
344
+ * Fix setting the article password from the Admin
345
+ [publify#1044](https://github.com/publify/publify/pull/1044)
141
346
 
142
347
  ## 9.2.6 / 2022-01-07
143
348
 
@@ -232,41 +437,41 @@ Additionally, it includes the following changes:
232
437
  * Let first-run users pick their own password instead of generating one (mvz)
233
438
 
234
439
  * Dependencies
235
- - Update dependencies (mvz)
236
- - Drop support for Ruby 2.1 (mvz)
440
+ * Update dependencies (mvz)
441
+ * Drop support for Ruby 2.1 (mvz)
237
442
 
238
443
  * Removing of old/outdated functionality
239
- - Remove support for feedburner (mvz)
240
- - Drop old redirects (mvz)
241
- - Remove RSD end point (mvz)
444
+ * Remove support for feedburner (mvz)
445
+ * Drop old redirects (mvz)
446
+ * Remove RSD end point (mvz)
242
447
 
243
448
  * Feedback
244
- - Stop sending trackbacks and pingbacks (mvz)
245
- - Stop accepting trackbacks (mvz)
449
+ * Stop sending trackbacks and pingbacks (mvz)
450
+ * Stop accepting trackbacks (mvz)
246
451
 
247
452
  * Improve Atom/RSS feeds
248
- - Fix URLs used for resources (mvz)
249
- - Fix URL/alternate links to not just point to the site root (mvz)
250
- - Unify comment and trackback feeds into feedback feed (mvz)
251
- - Add caching for feeds (mvz)
252
- - Fix atom entry publication date (mvz)
253
- - Fix ordering of feedback feed by using created_at (mvz)
453
+ * Fix URLs used for resources (mvz)
454
+ * Fix URL/alternate links to not just point to the site root (mvz)
455
+ * Unify comment and trackback feeds into feedback feed (mvz)
456
+ * Add caching for feeds (mvz)
457
+ * Fix atom entry publication date (mvz)
458
+ * Fix ordering of feedback feed by using created_at (mvz)
254
459
 
255
460
  * Bug fixes
256
- - Fix user resource image display when using Fog (mvz)
257
- - Fix sending of welcome email (mvz)
258
- - Fix Tag page description (mvz)
259
- - Handle setting published_at to blank (mvz)
260
- - Handle preview of articles without publication date (mvz)
261
- - Include CSRF meta tag so remote forms work (mvz)
262
- - Fix sidebar field rendering in admin (mvz)
263
- - Fix formatting of settings forms in admin (mvz)
461
+ * Fix user resource image display when using Fog (mvz)
462
+ * Fix sending of welcome email (mvz)
463
+ * Fix Tag page description (mvz)
464
+ * Handle setting published_at to blank (mvz)
465
+ * Handle preview of articles without publication date (mvz)
466
+ * Include CSRF meta tag so remote forms work (mvz)
467
+ * Fix sidebar field rendering in admin (mvz)
468
+ * Fix formatting of settings forms in admin (mvz)
264
469
 
265
470
  * Code improvements
266
- - Performance improvements (mvz)
267
- - Improve tags controller (mvz)
268
- - Clean up archives and authors page code (mvz)
269
- - Unify content models more to improve performance when mixing models (mvz)
471
+ * Performance improvements (mvz)
472
+ * Improve tags controller (mvz)
473
+ * Clean up archives and authors page code (mvz)
474
+ * Unify content models more to improve performance when mixing models (mvz)
270
475
 
271
476
  ## 9.0.0.pre6 / 2016-12-23
272
477
 
@@ -5,7 +5,6 @@
5
5
  //= require rails-timeago-all
6
6
  //= require set-timeago-lang
7
7
  //= require jquery_ujs
8
- //= require lightbox
9
8
  //= require markup_help_popup
10
9
  //= require observe
11
10
  //= require optional_field_toggle
@@ -3,13 +3,13 @@
3
3
  //= require jquery
4
4
  //= require jquery_ujs
5
5
  //= require jquery-ui
6
+ //= require popper
6
7
  //= require bootstrap-sprockets
7
8
  //= require quicktags
8
9
  //= require tagmanager
9
10
  //= require typeahead
10
11
  //= require sidebar
11
12
  //= require spinnable
12
- //= require lightbox
13
13
  //
14
14
  //= require_self
15
15
 
@@ -69,12 +69,13 @@ $(document).ready(function() {
69
69
  $('#article_form').each(function(e){tag_manager()});
70
70
  $('#checkall').click(function(e){check_all(e.target)});
71
71
 
72
- // DropDown
73
- $(".dropdown-toggle").dropdown();
72
+ const lightboxModal = document.getElementById('image-lightbox-modal');
73
+ if (lightboxModal) {
74
+ lightboxModal.addEventListener('show.bs.modal', event => {
75
+ const triggerElem = event.relatedTarget;
76
+ const imageUrl = triggerElem.getAttribute('data-bs-imageurl');
77
+ const imageElem = lightboxModal.querySelector('.modal-body img')
78
+ imageElem.src = imageUrl;
79
+ })
80
+ }
74
81
  });
75
-
76
- $(document).delegate('*[data-toggle="lightbox"]', 'click',
77
- function(event) {
78
- event.preventDefault();
79
- $(this).ekkoLightbox();
80
- });
@@ -1,5 +1,3 @@
1
- // "bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables"
2
- @import "bootstrap-sprockets";
3
1
  @import "bootstrap";
4
2
 
5
3
  body {
@@ -58,10 +58,6 @@ tr .action {
58
58
  .page-title { display:inline-block }
59
59
  /* Classes for menu icons */
60
60
 
61
- .btn-action {
62
- padding: 4px;
63
- }
64
-
65
61
  #article_title,
66
62
  #page_title {
67
63
  font-size: 2.3em;
@@ -1,6 +1,5 @@
1
1
  /*
2
2
  *= require coderay
3
- *= require lightbox
4
3
  */
5
4
 
6
5
  .statuses_sidebar {
@@ -4,6 +4,4 @@
4
4
  *= require tagmanager
5
5
  *= require sidebar_admin
6
6
  */
7
- // "bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables"
8
- @import "bootstrap-sprockets";
9
7
  @import "bootstrap";
@@ -27,10 +27,4 @@
27
27
  h3 {
28
28
  margin-top: 0;
29
29
  }
30
- .deletion_link {
31
- position: absolute;
32
- top: 20px;
33
- right: 20px;
34
- display: inline-block;
35
- }
36
30
  }
@@ -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
 
@@ -116,7 +119,7 @@ class Admin::ArticlesController < Admin::BaseController
116
119
  @article.text_filter_name ||= default_text_filter
117
120
 
118
121
  if @article.title.blank?
119
- lastid = Article.order("id desc").first.id
122
+ lastid = Article.order(id: :desc).first.id
120
123
  @article.title = "Draft article #{lastid}"
121
124
  end
122
125
 
@@ -9,7 +9,7 @@ class Admin::BaseController < BaseController
9
9
  @@look_for_migrations = true
10
10
  layout "administration"
11
11
 
12
- before_action :login_required, except: [:login, :signup]
12
+ before_action :login_required
13
13
  before_action :no_caching
14
14
 
15
15
  private
@@ -18,7 +18,7 @@ class Admin::BaseController < BaseController
18
18
  @record = klass_to_destroy.find(params[:id])
19
19
  if @record.respond_to?(:access_by?) && !@record.access_by?(current_user)
20
20
  flash[:error] = I18n.t("admin.base.not_allowed")
21
- return(redirect_to action: "index")
21
+ return redirect_to action: "index"
22
22
  end
23
23
  @record.destroy
24
24
  flash[:notice] = I18n.t("admin.base.successfully_deleted",
@@ -4,13 +4,13 @@ class Admin::RedirectsController < Admin::BaseController
4
4
  before_action :set_redirect, only: [:edit, :update, :destroy]
5
5
 
6
6
  def index
7
- @redirects = Redirect.where(content_id: nil).order("id desc").page(params[:page])
7
+ @redirects = Redirect.where(content_id: nil).order(id: :desc).page(params[:page])
8
8
  .per(this_blog.admin_display_elements)
9
9
  @redirect = Redirect.new
10
10
  end
11
11
 
12
12
  def edit
13
- @redirects = Redirect.where(content_id: nil).order("id desc").page(params[:page])
13
+ @redirects = Redirect.where(content_id: nil).order(id: :desc).page(params[:page])
14
14
  .per(this_blog.admin_display_elements)
15
15
  end
16
16
 
@@ -18,7 +18,7 @@ class Admin::ResourcesController < Admin::BaseController
18
18
 
19
19
  def index
20
20
  @r = Resource.new
21
- @resources = Resource.order("created_at DESC").page(params[:page])
21
+ @resources = Resource.order(created_at: :desc).page(params[:page])
22
22
  .per(this_blog.admin_display_elements)
23
23
  end
24
24
 
@@ -4,6 +4,8 @@ class Admin::SeoController < Admin::BaseController
4
4
  before_action :set_setting
5
5
  before_action :set_section
6
6
 
7
+ VALID_SECTIONS = %w(general titles permalinks).freeze
8
+
7
9
  def show
8
10
  if @setting.permalink_format != "/%year%/%month%/%day%/%title%" &&
9
11
  @setting.permalink_format != "/%year%/%month%/%title%" &&
@@ -37,8 +39,6 @@ class Admin::SeoController < Admin::BaseController
37
39
  @setting.settings_keys + [:custom_permalink]
38
40
  end
39
41
 
40
- VALID_SECTIONS = %w(general titles permalinks).freeze
41
-
42
42
  def set_section
43
43
  section = params[:section]
44
44
  @section = VALID_SECTIONS.include?(section) ? section : "general"
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Admin::SettingsController < Admin::BaseController
4
+ VALID_ACTIONS = %w(index write feedback display).freeze
5
+
4
6
  def index
5
7
  this_blog.base_url = blog_base_url if this_blog.base_url.blank?
6
8
  load_settings
@@ -33,8 +35,6 @@ class Admin::SettingsController < Admin::BaseController
33
35
 
34
36
  private
35
37
 
36
- VALID_ACTIONS = %w(index write feedback display).freeze
37
-
38
38
  def settings_params
39
39
  @settings_params ||= params.require(:setting).permit(@setting.settings_keys)
40
40
  end
@@ -51,7 +51,7 @@ class Admin::TagsController < Admin::BaseController
51
51
  end
52
52
 
53
53
  def fetch_tags
54
- @tags = Tag.order("display_name").page(params[:page])
54
+ @tags = Tag.order(:display_name).page(params[:page])
55
55
  .per(this_blog.admin_display_elements)
56
56
  end
57
57
  end
@@ -4,7 +4,7 @@ class Admin::UsersController < Admin::BaseController
4
4
  before_action :set_user, only: [:edit, :update, :destroy]
5
5
 
6
6
  def index
7
- @users = User.order("login asc").page(params[:page])
7
+ @users = User.order(:login).page(params[:page])
8
8
  .per(this_blog.admin_display_elements)
9
9
  end
10
10
 
@@ -38,7 +38,7 @@ class Admin::UsersController < Admin::BaseController
38
38
  end
39
39
 
40
40
  def destroy
41
- @user.destroy if User.where("profile = ? and id != ?", User::ADMIN, @user.id).count > 1
41
+ @user.destroy if User.where("profile = ? and id != ?", User::ADMIN, @user.id).many?
42
42
  redirect_to admin_users_url
43
43
  end
44
44
 
@@ -5,9 +5,6 @@ class ArticlesController < ContentController
5
5
 
6
6
  before_action :login_required, only: [:preview, :preview_page]
7
7
  before_action :verify_config
8
- before_action :auto_discovery_feed, only: [:show, :index]
9
-
10
- layout :theme_layout, except: [:trackback]
11
8
 
12
9
  helper :"admin/base"
13
10
 
@@ -98,7 +95,7 @@ class ArticlesController < ContentController
98
95
  r = Redirect.find_by!(from_path: from)
99
96
  # TODO: If linked to article, directly redirect to the article.
100
97
  # Let redirection made outside of the blog on purpose (deal with it, Brakeman!)
101
- redirect_to r.full_to_path, status: :moved_permanently if r
98
+ redirect_to r.full_to_path, allow_other_host: true, status: :moved_permanently if r
102
99
  end
103
100
 
104
101
  def archives
@@ -154,7 +151,7 @@ class ArticlesController < ContentController
154
151
  def verify_config
155
152
  if !this_blog.configured?
156
153
  redirect_to controller: "setup", action: "index"
157
- elsif User.count == 0
154
+ elsif User.none?
158
155
  redirect_to new_user_registration_path
159
156
  else
160
157
  true
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class AuthorsController < ContentController
4
- layout :theme_layout
5
-
6
4
  def show
7
5
  @author = User.find_by(login: params[:id])
8
6
  raise ActiveRecord::RecordNotFound unless @author