Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@
arch: product.arch,
instance_data: 'dummy_instance_data',
proxy_byos_mode: :hybrid,
token: nil,
hwinfo:
{
hostname: 'test',
Expand Down Expand Up @@ -636,6 +637,7 @@
data = JSON.parse(response.body)
expect(data['product']['free']).to eq(false)
expect(data['id']).to eq(product.id)
expect(controller).not_to receive(:update_pubcloud_reg_code)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion engines/scc_proxy/lib/scc_proxy/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def scc_activate_product
mode
)
end
update_pubcloud_reg_code(Base64.strict_encode64(params.fetch(:token, '')))
update_pubcloud_reg_code(Base64.strict_encode64(params[:token])) if params[:token].present?
rescue *NET_HTTP_ERRORS => e
logger.error(
"Could not activate product for system with regcode #{params[:token]}" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

it 'service url has http scheme' do
expect(service_url).to match(%r{^plugin:/susecloud})
# when no token in params we do not update the pubcloud registration code
# bsc#1244166
expect(controller).not_to receive(:update_pubcloud_reg_code)
end
end

Expand Down
7 changes: 7 additions & 0 deletions package/obs/rmt-server.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Jun 6 11:38:57 UTC 2025 - Jesús Bermúdez Velázquez <[email protected]>

- Version 2.23
* rmt-server-pubcloud:
* Only update the pubcloud regcode if there is a value (bsc#1244166)

-------------------------------------------------------------------
Tue Jan 21 10:49:54 UTC 2025 - Jesús Bermúdez Velázquez <[email protected]>

Expand Down