aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/projectstore
diff options
context:
space:
mode:
authorZousar Shaker <[email protected]>2025-10-02 03:11:53 -0600
committerGitHub Enterprise <[email protected]>2025-10-02 11:11:53 +0200
commitc153a4516968c453fce626133d5966682c6ae341 (patch)
tree65c0eb5d3fb0f4216780c6dd0e9c1c583f3e38d1 /src/zenserver/projectstore
parent5.7.4 (diff)
downloadzen-c153a4516968c453fce626133d5966682c6ae341.tar.xz
zen-c153a4516968c453fce626133d5966682c6ae341.zip
Zs/OIDC exe path handling (#538)
* Fix handling of oidc-exe-path The path was only being set if the file DIDN'T exist on the server (along with the warning about it not existing). Now set if it DOES exist, and the warning emitted if it DOESN'T.
Diffstat (limited to 'src/zenserver/projectstore')
-rw-r--r--src/zenserver/projectstore/projectstore.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/zenserver/projectstore/projectstore.cpp b/src/zenserver/projectstore/projectstore.cpp
index 0fe66bdf1..181177653 100644
--- a/src/zenserver/projectstore/projectstore.cpp
+++ b/src/zenserver/projectstore/projectstore.cpp
@@ -216,11 +216,14 @@ namespace {
if (std::string_view OidcExePathString = Cloud["oidc-exe-path"].AsString(); !OidcExePathString.empty())
{
std::filesystem::path OidcExePathMaybe(OidcExePathString);
- if (!IsFile(OidcExePathMaybe))
+ if (IsFile(OidcExePathMaybe))
{
- ZEN_WARN("Path to OidcToken executable '{}' can not be reached by server", OidcExePathString);
OidcExePath = std::move(OidcExePathMaybe);
}
+ else
+ {
+ ZEN_WARN("Path to OidcToken executable '{}' can not be reached by server", OidcExePathString);
+ }
}
std::string_view KeyParam = Cloud["key"sv].AsString();
if (KeyParam.empty())
@@ -326,11 +329,14 @@ namespace {
if (std::string_view OidcExePathString = Builds["oidc-exe-path"].AsString(); !OidcExePathString.empty())
{
std::filesystem::path OidcExePathMaybe(OidcExePathString);
- if (!IsFile(OidcExePathMaybe))
+ if (IsFile(OidcExePathMaybe))
{
- ZEN_WARN("Path to OidcToken executable '{}' can not be reached by server", OidcExePathString);
OidcExePath = std::move(OidcExePathMaybe);
}
+ else
+ {
+ ZEN_WARN("Path to OidcToken executable '{}' can not be reached by server", OidcExePathString);
+ }
}
std::string_view BuildIdParam = Builds["buildsid"sv].AsString();
if (BuildIdParam.empty())