Skip to content

Commit 73615a7

Browse files
committed
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 5048bfb commit 73615a7

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
@@ -363,8 +363,8 @@ private function initializePkiConfigPath(): string {
363363
}
364364
$pkiDirName = $this->caIdentifierService->generatePkiDirectoryName($caId);
365365
$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data/');
366-
$instanceId = $this->config->getSystemValue('instanceid');
367-
$pkiPath = $dataDir . '/appdata_' . $instanceId . '/libresign/' . $pkiDirName;
366+
$systemInstanceId = $this->config->getSystemValue('instanceid');
367+
$pkiPath = $dataDir . '/appdata_' . $systemInstanceId . '/libresign/' . $pkiDirName;
368368

369369
if (!is_dir($pkiPath)) {
370370
$this->createDirectoryWithCorrectOwnership($pkiPath);

0 commit comments

Comments
 (0)