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
1 changed files with 4 additions and 0 deletions

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