refinerycms-authentication-devise 1.0.4 → 1.0.5
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
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 8666fa20c460a9f8d95f5d753d545587fc146a489512d90daf159ff2f3098841
|
|
4
|
+
data.tar.gz: b362dac598490f5f07a6a6d40b80eca828c3df2f56127f7e25875592dba21599
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 75bd234c7602c259fc91a88153231f9672a3a8667a3ddb2e8997c87951af507c4d876181a890ae8ca78492ad242bdf40d8b1c0b5e5fc5296a7f76a518a980dd0
|
|
7
|
+
data.tar.gz: 807f981a64c774faa2c422a0de1db99d2a35de36f3b353275f9b9aa2c8e2c19f2621120b09b8a3cc602350e00c2add234064450b3e63d1667efbb5878cb86e41
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Release Gem to rubygems.org
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- v*
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
push:
|
|
10
|
+
if: github.repository == 'refinery/refinerycms-authentication-devise'
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
environment: release
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write
|
|
16
|
+
id-token: write
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
# Set up
|
|
20
|
+
- uses: actions/checkout@v6
|
|
21
|
+
- name: Set up Ruby
|
|
22
|
+
uses: ruby/setup-ruby@v1
|
|
23
|
+
with:
|
|
24
|
+
ruby-version: ruby
|
|
25
|
+
|
|
26
|
+
# Release
|
|
27
|
+
#
|
|
28
|
+
# The gem is built with `gem build` and pushed with `gem push` rather than
|
|
29
|
+
# through `rake release`, so no bundle is installed. This keeps the same
|
|
30
|
+
# workflow working on older release lines whose bundle does not resolve
|
|
31
|
+
# on a current Ruby.
|
|
32
|
+
#
|
|
33
|
+
# rubygems/configure-rubygems-credentials exchanges the GitHub Actions OIDC
|
|
34
|
+
# token for a temporary RubyGems API key, enabling trusted publishing without
|
|
35
|
+
# storing any secrets.
|
|
36
|
+
- name: Configure RubyGems credentials
|
|
37
|
+
uses: rubygems/configure-rubygems-credentials@v2.0.0
|
|
38
|
+
- name: Release gem
|
|
39
|
+
run: |
|
|
40
|
+
gem build refinerycms-authentication-devise.gemspec --output refinerycms-authentication-devise.gem
|
|
41
|
+
gem push refinerycms-authentication-devise.gem
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
## 1.0.5 [21 November 2026]
|
|
2
|
+
|
|
3
|
+
* Fix authenticated privilege escalation via plugin self-assignment [GHSA-rvc7-xf2h-wf33](https://github.com/refinery/refinerycms-authentication-devise/security/advisories/GHSA-rvc7-xf2h-wf33) ([bl4cksku11](https://github.com/bl4cksku11))
|
|
4
|
+
|
|
5
|
+
- [See full list](https://github.com/refinery/refinerycms-authentication-devise/compare/1.0.4...1.0.5)
|
|
@@ -39,6 +39,10 @@ module Refinery
|
|
|
39
39
|
@selected_role_names = params[:user].delete(:roles) || []
|
|
40
40
|
@selected_role_names = @user.roles.select(:title).map(&:title) unless user_can_assign_roles?
|
|
41
41
|
@selected_plugin_names = params[:user][:plugins]
|
|
42
|
+
unless user_can_assign_plugins?
|
|
43
|
+
@selected_plugin_names = @user.plugins.pluck(:name)
|
|
44
|
+
params[:user][:plugins] = @selected_plugin_names
|
|
45
|
+
end
|
|
42
46
|
|
|
43
47
|
if user_is_locking_themselves_out?
|
|
44
48
|
flash.now[:error] = t('lockout_prevented', :scope => 'refinery.authentication.devise.admin.users.update')
|
|
@@ -115,6 +119,10 @@ module Refinery
|
|
|
115
119
|
current_refinery_user.has_role?(:superuser)
|
|
116
120
|
end
|
|
117
121
|
|
|
122
|
+
def user_can_assign_plugins?
|
|
123
|
+
current_refinery_user.has_role?(:superuser)
|
|
124
|
+
end
|
|
125
|
+
|
|
118
126
|
def user_is_locking_themselves_out?
|
|
119
127
|
return false if current_refinery_user.id != @user.id || @selected_plugin_names.blank?
|
|
120
128
|
|
|
@@ -135,10 +143,9 @@ module Refinery
|
|
|
135
143
|
end
|
|
136
144
|
|
|
137
145
|
def user_params
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
)
|
|
146
|
+
base = [:email, :password, :password_confirmation, :remember_me, :username, :login, :full_name]
|
|
147
|
+
base << { :plugins => [] } if current_refinery_user.has_role?(:superuser)
|
|
148
|
+
params.require(:user).permit(*base)
|
|
142
149
|
end
|
|
143
150
|
end
|
|
144
151
|
end
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Gem::Specification.new do |s|
|
|
3
3
|
s.platform = Gem::Platform::RUBY
|
|
4
4
|
s.name = %q{refinerycms-authentication-devise}
|
|
5
|
-
s.version = %q{1.0.
|
|
5
|
+
s.version = %q{1.0.5}
|
|
6
6
|
s.summary = %q{Devise based authentication extension for Refinery CMS}
|
|
7
7
|
s.description = %q{A Devise authentication extension for Refinery CMS}
|
|
8
8
|
s.homepage = %q{http://refinerycms.com}
|
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: refinerycms-authentication-devise
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Philip Arndt
|
|
8
8
|
- Rob Yurkowski
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: refinerycms-core
|
|
@@ -86,13 +85,14 @@ dependencies:
|
|
|
86
85
|
- !ruby/object:Gem::Version
|
|
87
86
|
version: 5.1.0
|
|
88
87
|
description: A Devise authentication extension for Refinery CMS
|
|
89
|
-
email:
|
|
90
88
|
executables: []
|
|
91
89
|
extensions: []
|
|
92
90
|
extra_rdoc_files: []
|
|
93
91
|
files:
|
|
92
|
+
- ".github/workflows/release.yml"
|
|
94
93
|
- ".gitignore"
|
|
95
94
|
- ".travis.yml"
|
|
95
|
+
- CHANGELOG.md
|
|
96
96
|
- Gemfile
|
|
97
97
|
- Rakefile
|
|
98
98
|
- app/controllers/refinery/authentication/devise/admin/users_controller.rb
|
|
@@ -193,7 +193,6 @@ homepage: http://refinerycms.com
|
|
|
193
193
|
licenses:
|
|
194
194
|
- MIT
|
|
195
195
|
metadata: {}
|
|
196
|
-
post_install_message:
|
|
197
196
|
rdoc_options: []
|
|
198
197
|
require_paths:
|
|
199
198
|
- lib
|
|
@@ -208,9 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
208
207
|
- !ruby/object:Gem::Version
|
|
209
208
|
version: '0'
|
|
210
209
|
requirements: []
|
|
211
|
-
|
|
212
|
-
rubygems_version: 2.4.8
|
|
213
|
-
signing_key:
|
|
210
|
+
rubygems_version: 4.0.20
|
|
214
211
|
specification_version: 4
|
|
215
212
|
summary: Devise based authentication extension for Refinery CMS
|
|
216
213
|
test_files:
|
|
@@ -224,4 +221,3 @@ test_files:
|
|
|
224
221
|
- spec/spec_helper.rb
|
|
225
222
|
- spec/support/refinery/authentication/devise/controller_macros.rb
|
|
226
223
|
- spec/support/refinery/authentication/devise/feature_macros.rb
|
|
227
|
-
has_rdoc:
|