Skip to content

Commit 63eefd0

Browse files
fix: use correct Nextcloud instanceid in PKI path initialization
The initializePkiConfigPath method was using a variable named 'instanceId' from getSystemValue('instanceid') which could be confused with LibreSign's instance_id. Changed to 'systemInstanceId' for clarity and consistency with getConfigPathByParams method. This ensures the PKI directories are created in the correct appdata path using Nextcloud's system instance ID, while the directory name itself contains LibreSign's CA identifier with its own instance ID. Signed-off-by: Vitor Mattos <[email protected]>
1 parent 12c0afa commit 63eefd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Handler/CertificateEngine/AEngineHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,8 @@ private function initializePkiConfigPath(): string {
356356
}
357357
$pkiDirName = $this->caIdentifierService->generatePkiDirectoryName($caId);
358358
$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data/');
359-
$instanceId = $this->config->getSystemValue('instanceid');
360-
$pkiPath = $dataDir . '/appdata_' . $instanceId . '/libresign/' . $pkiDirName;
359+
$systemInstanceId = $this->config->getSystemValue('instanceid');
360+
$pkiPath = $dataDir . '/appdata_' . $systemInstanceId . '/libresign/' . $pkiDirName;
361361

362362
if (!is_dir($pkiPath)) {
363363
$this->createDirectoryWithCorrectOwnership($pkiPath);

0 commit comments

Comments
 (0)