foreman_remote_execution 8.3.0 → 8.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/extra/cockpit/foreman-cockpit-session +29 -12
- data/lib/foreman_remote_execution/version.rb +1 -1
- data/webpack/JobWizard/autofill.js +5 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb6aa7e8d08233993c7f908975b7688460969ad1182b008ab8697767a772fffc
|
4
|
+
data.tar.gz: 8e1096d3d25655600889f7abecd499f7157d344a82f8ead12fc226b4ba180eb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa738c870c881c464e22ca4d59361e6ca8c28c878dfa368c09c3c31ea7766fabfe2ddfac585dfe1fdb401d16b56a80bf1a645d53d7df633a8a527b2bc56fec57
|
7
|
+
data.tar.gz: 2db1f5515cc9b3570d629a0a9149883b7691d4bcd3ebfb8e7383604665bd424b78df968949848c661f5ab22350fc4769ceaa524e74550f6402c20c759ab9e212
|
@@ -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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman Remote Execution team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|