Skip to content

Commit bd2b50a

Browse files
committed
validate against the correct directory
1 parent ca8ea2e commit bd2b50a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/lib/BackupManager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ BackupManager::BackupManager(SystemInterface* sysInterface, QObject* parent)
1818
bool BackupManager::createBackup(const QString& partition, const QString& outputPath) {
1919
Logger::instance().info("Creating XFS backup of " + partition);
2020

21-
// Validate output path to prevent path traversal
22-
QString backupDir = Config::instance().backupDir();
23-
if (!m_sysInterface->validatePath(outputPath, backupDir)) {
21+
// Validate output path to prevent path traversal (backup files go into xfsDir)
22+
QString xfsDir = Config::instance().xfsDir();
23+
if (!m_sysInterface->validatePath(outputPath, xfsDir)) {
2424
Logger::instance().error("SECURITY: Invalid backup output path");
2525
return false;
2626
}

0 commit comments

Comments
 (0)