From 6313ecb7d4e67d0b89ef55f6a1991bc86b4093ae Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Mon, 25 Jan 2021 15:28:35 +0100 Subject: [PATCH] Treat empty secrets as no secret --- src/Cache.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Cache.cpp b/src/Cache.cpp index 6b3067db..de377f49 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp @@ -661,6 +661,10 @@ Cache::secret(const std::string &name) "Restoring secret '{}' failed: {}", name, job.errorString().toStdString()); return std::nullopt; } + if (secret.isEmpty()) { + nhlog::db()->debug("Restored empty secret '{}'.", name); + return std::nullopt; + } return secret.toStdString(); }