camaleon_cms 2.7.2 → 2.7.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.

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95a6608503ee3abb086b964320604919a89edcb91734fbc074cf6e2d9b987939
4
- data.tar.gz: c4534ae36d4b94bdfde90e5d3e0055ebbc22983d57638f3efa2e1a9041ae9af9
3
+ metadata.gz: db5860768212ca0703d01e3d2b16a691d5972917905bab1740cf16a1fb79ab58
4
+ data.tar.gz: cd0b90107912e5281d49d4a0070734a9db641deadb27f9671d27a13a297c8c71
5
5
  SHA512:
6
- metadata.gz: 50e47053858bf16f8e026dd56932ea4cb03382d8528ba48f0152e79afcaa5316792e65b50c4fec5f2df9e949a9bbd90aa4e4d5ccf864c80012d9757655a3317d
7
- data.tar.gz: 733057e98b9c730847fedf395ddd20945a45e5aa46e80e9e2736cc1bccd7a7245c13f6b34d28e8b4b80682cb76b3c741296aae97a78957677bb3a5e17e1a039e
6
+ metadata.gz: bfc9b376433413768f22e2b191f0f977697c8789004ef91eab78edd683ae22914a4a194c1e8568fa4d074a3eb5f7773b1d492298121b8afb64731c87bd390f8b
7
+ data.tar.gz: 99f90a12596bc5d24a8dd73555cba291d3140f84f4c5373931b6b62a8a79301126020c7de1a82b4fea7b4c5019062bbfc3573ad5e614584ab8777fc7e6767a2a
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2015 Camaleon CMS
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -8,7 +8,8 @@ module Plugins
8
8
  current_site.set_option('refresh_cache', false)
9
9
  end
10
10
 
11
- return if signin? || Rails.env == 'development' || Rails.env == 'test' || !request.get?
11
+ # avoid cache if current visitor is logged in or development
12
+ return if signin? || Rails.env.development? || Rails.env.test? || !request.get?
12
13
 
13
14
  cache_key = front_cache_plugin_cache_key
14
15
  @caches = current_site.get_meta('front_cache_elements')
@@ -80,7 +80,7 @@ module CamaleonCms
80
80
  cama_tmp_upload(params[:url], formats: params[:formats], name: params[:name])
81
81
  end
82
82
  if r[:error].present?
83
- render plain: r[:error]
83
+ render plain: helpers.sanitize(r[:error])
84
84
  else
85
85
  params[:file_upload] = r[:file_path]
86
86
  sett = { remove_source: true }
@@ -106,7 +106,7 @@ module CamaleonCms
106
106
  end
107
107
 
108
108
  if f[:error].present?
109
- render plain: f[:error]
109
+ render plain: helpers.sanitize(f[:error])
110
110
  else
111
111
  render partial: 'render_file_item', locals: { files: [f] }
112
112
  end
@@ -1,7 +1,5 @@
1
1
  module CamaleonCms
2
2
  class Category < CamaleonCms::TermTaxonomy
3
- include CamaleonCms::CommonRelationships
4
-
5
3
  alias_attribute :site_id, :term_group
6
4
  alias_attribute :post_type_id, :status
7
5
 
@@ -1,7 +1,5 @@
1
1
  module CamaleonCms
2
2
  class NavMenu < CamaleonCms::TermTaxonomy
3
- include CamaleonCms::CommonRelationships
4
-
5
3
  default_scope { where(taxonomy: :nav_menu).order(id: :asc) }
6
4
  alias_attribute :site_id, :parent_id
7
5
 
@@ -1,7 +1,5 @@
1
1
  module CamaleonCms
2
2
  class NavMenuItem < CamaleonCms::TermTaxonomy
3
- include CamaleonCms::CommonRelationships
4
-
5
3
  alias_attribute :site_id, :term_group
6
4
  alias_attribute :label, :name
7
5
  alias_attribute :url, :description
@@ -1,7 +1,5 @@
1
1
  module CamaleonCms
2
2
  class Plugin < CamaleonCms::TermTaxonomy
3
- include CamaleonCms::CommonRelationships
4
-
5
3
  # attrs:
6
4
  # term_group => status active (1, nil)
7
5
  # slug => plugin key
@@ -1,7 +1,6 @@
1
1
  module CamaleonCms
2
2
  class Post < CamaleonCms::PostDefault
3
3
  include CamaleonCms::CategoriesTagsForPosts
4
- include CamaleonCms::CommonRelationships
5
4
 
6
5
  alias_attribute :post_type_id, :taxonomy_id
7
6
  default_scope -> { where(post_class: 'Post').order(post_order: :asc, created_at: :desc) }
@@ -3,6 +3,14 @@ module CamaleonCms
3
3
  include CamaleonCms::Metas
4
4
  include CamaleonCms::CustomFieldsRead
5
5
 
6
+ def self.inherited(subclass)
7
+ super
8
+
9
+ subclass.class_eval do
10
+ include CamaleonCms::CommonRelationships
11
+ end
12
+ end
13
+
6
14
  self.table_name = "#{PluginRoutes.static_system_info['db_prefix']}posts"
7
15
 
8
16
  # attr_accessible :user_id, :title, :slug, :content, :content_filtered, :status, :visibility, :visibility_value, :post_order, :post_type_key, :taxonomy_id, :published_at, :post_parent, :post_order, :is_feature
@@ -1,7 +1,5 @@
1
1
  module CamaleonCms
2
2
  class PostTag < CamaleonCms::TermTaxonomy
3
- include CamaleonCms::CommonRelationships
4
-
5
3
  default_scope { where(taxonomy: :post_tag) }
6
4
 
7
5
  has_many :posts, foreign_key: :objectid, through: :term_relationships, source: :object
@@ -1,7 +1,5 @@
1
1
  module CamaleonCms
2
2
  class PostType < CamaleonCms::TermTaxonomy
3
- include CamaleonCms::CommonRelationships
4
-
5
3
  alias_attribute :site_id, :parent_id
6
4
  default_scope { where(taxonomy: :post_type) }
7
5
 
@@ -1,6 +1,5 @@
1
1
  module CamaleonCms
2
2
  class Site < CamaleonCms::TermTaxonomy
3
- include CamaleonCms::CommonRelationships
4
3
  include CamaleonCms::SiteDefaultSettings
5
4
 
6
5
  # attrs: [name, description, slug]
@@ -3,6 +3,14 @@ module CamaleonCms
3
3
  include CamaleonCms::Metas
4
4
  include CamaleonCms::CustomFieldsRead
5
5
 
6
+ def self.inherited(subclass)
7
+ super
8
+
9
+ subclass.class_eval do
10
+ include CamaleonCms::CommonRelationships
11
+ end
12
+ end
13
+
6
14
  self.table_name = "#{PluginRoutes.static_system_info['db_prefix']}term_taxonomy"
7
15
  # attr_accessible :taxonomy, :description, :parent_id, :count, :name, :slug, :term_group, :status, :term_order, :user_id
8
16
  # attr_accessible :data_options
@@ -1,7 +1,5 @@
1
1
  module CamaleonCms
2
2
  class Theme < CamaleonCms::TermTaxonomy
3
- include CamaleonCms::CommonRelationships
4
-
5
3
  # attrs:
6
4
  # slug => plugin key
7
5
  belongs_to :site, class_name: 'CamaleonCms::Site', foreign_key: :parent_id, required: false
@@ -1,7 +1,5 @@
1
1
  module CamaleonCms
2
2
  class UserRole < CamaleonCms::TermTaxonomy
3
- include CamaleonCms::CommonRelationships
4
-
5
3
  after_destroy :set_users_as_cilent
6
4
 
7
5
  default_scope { where(taxonomy: :user_roles) }
@@ -1,6 +1,7 @@
1
1
  module CamaleonCms
2
2
  module Metas
3
3
  extend ActiveSupport::Concern
4
+
4
5
  included do
5
6
  # options and metas auto save support
6
7
  attr_accessor :data_options
@@ -8,10 +9,6 @@ module CamaleonCms
8
9
 
9
10
  after_create :save_metas_options, unless: :save_metas_options_skip
10
11
  before_update :fix_save_metas_options_no_changed
11
-
12
- has_many :metas, lambda { |object|
13
- where(object_class: object.class.to_s.gsub('Decorator', '').gsub('CamaleonCms::', ''))
14
- }, class_name: 'CamaleonCms::Meta', foreign_key: :objectid, dependent: :delete_all
15
12
  end
16
13
 
17
14
  # Add meta with value or Update meta with key: key
@@ -47,4 +47,4 @@
47
47
  <div class="panel-footer text-right"><a href="#" class="btn btn-warning duplicate_cutom_group btn-xs"><i class="fa fa-plus"></i> <%= t('camaleon_cms.admin.button.add_new_group', default: 'Add new group')%></a></div>
48
48
  <% end %>
49
49
  </div>
50
- <% end %>
50
+ <% end %>
@@ -1,3 +1,3 @@
1
1
  module CamaleonCms
2
- VERSION = '2.7.2'.freeze
2
+ VERSION = '2.7.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: camaleon_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.2
4
+ version: 2.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Owen Peredo Diaz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-24 00:00:00.000000000 Z
11
+ date: 2023-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcrypt
@@ -388,6 +388,7 @@ executables: []
388
388
  extensions: []
389
389
  extra_rdoc_files: []
390
390
  files:
391
+ - LICENSE
391
392
  - README.md
392
393
  - Rakefile
393
394
  - app/apps/plugins/attack/admin_controller.rb
@@ -1102,7 +1103,7 @@ requirements:
1102
1103
  - rails >= 6.0
1103
1104
  - ruby >= 2.7
1104
1105
  - imagemagick
1105
- rubygems_version: 3.4.6
1106
+ rubygems_version: 3.4.10
1106
1107
  signing_key:
1107
1108
  specification_version: 4
1108
1109
  summary: Camaleon is a CMS for Ruby on Rails as an alternative to Wordpress.