Wizard: encode satellite cmd properly

This commit is contained in:
Lukas Zapletal 2025-05-12 17:11:21 +02:00 committed by Klara Simickova
parent 24fdc1147f
commit 1a3a0ecc03
2 changed files with 18 additions and 19 deletions

View file

@ -473,9 +473,7 @@ const getSatelliteCommand = (files?: File[]): string => {
const satelliteCommandFile = files?.find(
(file) => file.path === '/usr/local/sbin/register-satellite'
);
return satelliteCommandFile?.data
? decodeURIComponent(atob(satelliteCommandFile.data))
: '';
return satelliteCommandFile?.data ? atob(satelliteCommandFile.data) : '';
};
const uploadTypeByTargetEnv = (imageType: ImageTypes): UploadTypes => {
@ -587,7 +585,8 @@ const getCustomizations = (state: RootState, orgID: string): Customizations => {
});
files.push({
path: '/usr/local/sbin/register-satellite',
data: btoa(encodeURIComponent(satCmd)),
data: btoa(satCmd),
mode: '0774',
data_encoding: 'base64',
ensure_parents: true,
});