From b54ef9f5e5b5c814ecd0e7ba9077e7a390eb58f7 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 18 Jun 2020 18:14:10 +0200 Subject: [PATCH] Fix bad UUID generation. --- app/Support/System/GeneratesInstallationId.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/Support/System/GeneratesInstallationId.php b/app/Support/System/GeneratesInstallationId.php index 9dac7661eb..3ffe860b1e 100644 --- a/app/Support/System/GeneratesInstallationId.php +++ b/app/Support/System/GeneratesInstallationId.php @@ -17,9 +17,15 @@ trait GeneratesInstallationId protected function generateInstallationId(): void { $config = app('fireflyconfig')->get('installation_id', null); + + // delete if wrong UUID: + if (null !== $config && 'b2c27d92-be90-5c10-8589-005df5b314e6' === $config->data) { + $config = null; + } + if (null === $config) { - $uuid5 = Uuid::uuid5(Uuid::NAMESPACE_URL, 'firefly-iii.org'); - $uniqueId = (string) $uuid5; + $uuid4 = Uuid::uuid4(); + $uniqueId = (string) $uuid4; Log::info(sprintf('Created Firefly III installation ID %s', $uniqueId)); app('fireflyconfig')->set('installation_id', $uniqueId); }