Treat empty secrets as no secret

pull/417/head
Nicolas Werner 4 years ago
parent f0102c1e55
commit 6313ecb7d4
  1. 4
      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();
}

Loading…
Cancel
Save