From 3e03f2261af9e9d60bc884877229fc6404a2530b Mon Sep 17 00:00:00 2001 From: Jesus Bermudez Velazquez Date: Tue, 26 Nov 2024 17:07:18 +0000 Subject: [PATCH] Allowing future SUMA versions in the check --- .../strict_authentication/authentication_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/strict_authentication/app/controllers/strict_authentication/authentication_controller.rb b/engines/strict_authentication/app/controllers/strict_authentication/authentication_controller.rb index ec671999b..a0109ad34 100644 --- a/engines/strict_authentication/app/controllers/strict_authentication/authentication_controller.rb +++ b/engines/strict_authentication/app/controllers/strict_authentication/authentication_controller.rb @@ -45,7 +45,7 @@ def all_allowed_paths(headers) # SUMA 5.0 must have access to SUMA 4.3, 4.2 and so on micro = p.identifier.downcase.include?('sle-micro') instance_id_header = headers.fetch('X-Instance-Identifier', '').casecmp('suse-manager-server').zero? - instance_version_header = headers.fetch('X-Instance-Version', '') == '5.0' + instance_version_header = headers.fetch('X-Instance-Version', '0').split('.')[0] >= '5' manager || (micro && instance_id_header && instance_version_header) end