foreman_remote_execution 8.3.0 → 8.3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e314ca935b105cff932a0e45bf8c9d8c6d89c40ff036cdf38938f0c49156056a
|
4
|
+
data.tar.gz: 5658ed442b54263bef82b179e44aee1b8994a6ea059a1424000fa13535c92621
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e78f24707b070f0e265291864eb29d2bbc939d1cdb06b92f1196f162abd210ace6b1ca6075da46ba71c625bf5f6cf9975657aff00733de769d963e779b36116
|
7
|
+
data.tar.gz: 4b39682eea754deb3eee202aacd85d3500f9afeb9e07fc9da3ce7a08fd86a895df920b6d623c10820df71e80522b01215a6c4528b26490487ce4bae5d2452172
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class UiJobWizardController < ApplicationController
|
2
2
|
include FiltersHelper
|
3
3
|
def categories
|
4
|
-
job_categories = resource_scope
|
4
|
+
job_categories = resource_scope(permission: action_permission)
|
5
5
|
.search_for("job_category ~ \"#{params[:search]}\"")
|
6
6
|
.where(:snippet => false)
|
7
7
|
.select(:job_category).distinct
|
@@ -170,24 +170,41 @@ class Relay
|
|
170
170
|
def initialize(proxy, params)
|
171
171
|
@proxy = proxy
|
172
172
|
@params = params
|
173
|
+
@inject_authorization = @params['ssh_user'] != 'root' && @params['effective_user_password']
|
173
174
|
end
|
174
175
|
|
175
176
|
def proxy_loop
|
176
177
|
proxy1 = ProxyBuffer.new($stdin, @sock)
|
177
178
|
proxy2 = ProxyBuffer.new(@sock, $stdout)
|
178
179
|
proxy2.on_data do |data|
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
'
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
180
|
+
if @inject_authorization
|
181
|
+
sio = StringIO.new(data)
|
182
|
+
begin
|
183
|
+
message = Cockpit.read_control(sio)
|
184
|
+
rescue StandardError
|
185
|
+
# We're looking for one specific message, but the expectation that one
|
186
|
+
# invocation of this callback processes one message doesn't really
|
187
|
+
# hold. The message we're looking for is sent quite early in the
|
188
|
+
# communication, if at all, so the chance that it will be aligned with
|
189
|
+
# the beginning of the buffer is quite high. If we somehow fail to
|
190
|
+
# process the contents of the buffer, we should just carry on.
|
191
|
+
#
|
192
|
+
# With the authorization injection check in place, this is more of a
|
193
|
+
# precaution so that unexpectedly big message won't bring the entire
|
194
|
+
# thing down.
|
195
|
+
end
|
196
|
+
if message.is_a?(Hash) && message['command'] == 'authorize'
|
197
|
+
response = {
|
198
|
+
'command' => 'authorize',
|
199
|
+
'cookie' => message['cookie'],
|
200
|
+
'response' => @params['effective_user_password'],
|
201
|
+
}
|
202
|
+
proxy1.enqueue(Cockpit.encode_message(response))
|
203
|
+
@inject_authorization = false
|
204
|
+
data = sio.read # Return whatever was left unread after read_control
|
205
|
+
end
|
190
206
|
end
|
207
|
+
data
|
191
208
|
end
|
192
209
|
|
193
210
|
proxies = [proxy1, proxy2]
|
@@ -271,7 +288,7 @@ class Relay
|
|
271
288
|
end
|
272
289
|
raise AccessDeniedError, message
|
273
290
|
else
|
274
|
-
raise CockpitError, "Error talking to smart proxy: #{
|
291
|
+
raise CockpitError, "Error talking to smart proxy: #{body}"
|
275
292
|
end
|
276
293
|
end
|
277
294
|
end
|
@@ -48,8 +48,11 @@ export const useAutoFill = ({
|
|
48
48
|
})
|
49
49
|
);
|
50
50
|
}
|
51
|
-
if (search && !hostIds?.length) {
|
52
|
-
|
51
|
+
if ((search || search === '') && !hostIds?.length) {
|
52
|
+
// replace an empty string search with a dummy search query to match all hosts
|
53
|
+
// but only if search query was entered (based on presence of :search parameter)
|
54
|
+
const hostSearch = search === '' ? "name != ''" : search;
|
55
|
+
setHostsSearchQuery(hostSearch);
|
53
56
|
}
|
54
57
|
if (templateID) {
|
55
58
|
setJobTemplateID(+templateID);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_remote_execution
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.3.
|
4
|
+
version: 8.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman Remote Execution team
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|
@@ -543,7 +543,7 @@ homepage: https://github.com/theforeman/foreman_remote_execution
|
|
543
543
|
licenses:
|
544
544
|
- GPL-3.0
|
545
545
|
metadata: {}
|
546
|
-
post_install_message:
|
546
|
+
post_install_message:
|
547
547
|
rdoc_options: []
|
548
548
|
require_paths:
|
549
549
|
- lib
|
@@ -558,8 +558,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
558
558
|
- !ruby/object:Gem::Version
|
559
559
|
version: '0'
|
560
560
|
requirements: []
|
561
|
-
rubygems_version: 3.
|
562
|
-
signing_key:
|
561
|
+
rubygems_version: 3.4.19
|
562
|
+
signing_key:
|
563
563
|
specification_version: 4
|
564
564
|
summary: A plugin bringing remote execution to the Foreman, completing the config
|
565
565
|
management functionality with remote management functionality.
|