Skip to content

Commit 4cc6bd6

Browse files
committed
fix: validate engine name in migration to prevent installation failures
During app installation, the migration Version13000Date20251031165700 was attempting to generate a CA identifier with an invalid or 'none' engine name, causing InvalidArgumentException. This fix adds validation to ensure only valid engine names ('openssl' or 'cfssl') are used when generating the CA identifier. Invalid values are now safely ignored. Fixes installation error: 'Database error when running migration 13000Date20251031165700 for app libresign - Invalid engine name: none' Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 5120256 commit 4cc6bd6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/Migration/Version13000Date20251031165700.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ private function migrateToNewestConfigFormat(): void {
138138
$originalCaId = $this->appConfig->getValueString(Application::APP_ID, 'ca_id');
139139
if (empty($originalCaId)) {
140140
$engineName = $this->appConfig->getValueString(Application::APP_ID, 'certificate_engine');
141-
if ($engineName) {
141+
$validEngines = ['openssl', 'cfssl'];
142+
if (!empty($engineName) && in_array($engineName, $validEngines, true)) {
142143
$originalCaId = $this->caIdentifierService->generateCaId($engineName);
143144
}
144145
}

0 commit comments

Comments
 (0)