Treat empty secrets as no secret

This commit is contained in:
Nicolas Werner 2021-01-25 15:28:35 +01:00
parent f0102c1e55
commit 6313ecb7d4

View file

@ -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();
}