aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2025-06-11 15:14:37 +0200
committerGitHub Enterprise <[email protected]>2025-06-11 15:14:37 +0200
commit29113409da4d2ee5f1ae46c1600d66c2617bb7e3 (patch)
tree63b66bd14b8863bc69bb151c28bb2532d25f216d /src/zenhttp
parentSkeleton of rpc recording analysis command (diff)
parent5.6.12 (diff)
downloadzen-29113409da4d2ee5f1ae46c1600d66c2617bb7e3.tar.xz
zen-29113409da4d2ee5f1ae46c1600d66c2617bb7e3.zip
Merge branch 'main' into rpc-analyze
Diffstat (limited to 'src/zenhttp')
-rw-r--r--src/zenhttp/httpclient.cpp2
-rw-r--r--src/zenhttp/httpclientauth.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/zenhttp/httpclient.cpp b/src/zenhttp/httpclient.cpp
index f2b26b922..a2d323b5e 100644
--- a/src/zenhttp/httpclient.cpp
+++ b/src/zenhttp/httpclient.cpp
@@ -333,7 +333,7 @@ namespace detail {
m_Buffer = (uint8_t*)Memory::Alloc(gsl::narrow<size_t>(m_BufferSize));
}
m_BufferStart = Begin;
- m_BufferEnd = Min(Begin + m_BufferSize, m_FileSize);
+ m_BufferEnd = Min(Begin + m_BufferSize, m_FileEnd);
Read(m_Buffer, m_BufferEnd - m_BufferStart, m_BufferStart);
uint64_t Count = Min(m_BufferEnd, End) - m_BufferStart;
memcpy(WritePtr + Begin - m_FileOffset, m_Buffer, Count);
diff --git a/src/zenhttp/httpclientauth.cpp b/src/zenhttp/httpclientauth.cpp
index 916b25bff..39efe1d0c 100644
--- a/src/zenhttp/httpclientauth.cpp
+++ b/src/zenhttp/httpclientauth.cpp
@@ -7,6 +7,7 @@
#include <zencore/process.h>
#include <zencore/scopeguard.h>
#include <zencore/timer.h>
+#include <zencore/uid.h>
#include <zenhttp/auth/authmgr.h>
#include <ctime>
@@ -94,9 +95,8 @@ namespace zen { namespace httpclientauth {
CreateProcOptions ProcOptions;
- const std::string AuthTokenPath = ".zen-auth-oidctoken";
-
- auto _ = MakeGuard([AuthTokenPath]() { RemoveFile(AuthTokenPath); });
+ const std::filesystem::path AuthTokenPath(std::filesystem::temp_directory_path() / fmt::format(".zen-auth-{}", Oid::NewOid()));
+ auto _ = MakeGuard([AuthTokenPath]() { RemoveFile(AuthTokenPath); });
const std::string ProcArgs = fmt::format("{} --AuthConfigUrl {} --OutFile {} --Unattended={}",
OidcExecutablePath,