Update Sftp.php (#4820)

Fixed an issue where SFTP backup would not be able to list remote backups if hostname was prefixed and hostname or domain had uppercase characters.
This commit is contained in:
Russ Kubes 2025-07-16 15:48:34 -05:00 committed by GitHub
parent 2e7ed15579
commit 4ca070d108
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -236,7 +236,7 @@ class Sftp extends Base implements IBackupProvider
$fileprefix = "config-";
} else {
$config = $cnf->object();
$fileprefix = sprintf('%s.%s-', (string)$config->system->hostname, (string)$config->system->domain);
$fileprefix = strtolower(sprintf('%s.%s-', (string)$config->system->hostname, (string)$config->system->domain));
}
/**
* Collect most recent backup, since /conf/backup/ always contains the latests, we can use the filename