diff options
| author | Dan Engelbrecht <[email protected]> | 2024-05-02 17:01:09 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-05-02 17:01:09 +0200 |
| commit | 375fa71cb816acb25bd2eaf24ef5cc292a1f2c36 (patch) | |
| tree | 7d8e20b99bd65af37f75cb95f18c0c0001e58dcd /src/zenhttp | |
| parent | batch cache put (#67) (diff) | |
| download | zen-375fa71cb816acb25bd2eaf24ef5cc292a1f2c36.tar.xz zen-375fa71cb816acb25bd2eaf24ef5cc292a1f2c36.zip | |
use write and move in place for safer writing of files (#70)
* use write and move in place for safer writing of files
Diffstat (limited to 'src/zenhttp')
| -rw-r--r-- | src/zenhttp/auth/authmgr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/zenhttp/auth/authmgr.cpp b/src/zenhttp/auth/authmgr.cpp index a520e8fd1..bf151ce6d 100644 --- a/src/zenhttp/auth/authmgr.cpp +++ b/src/zenhttp/auth/authmgr.cpp @@ -9,6 +9,7 @@ #include <zencore/filesystem.h> #include <zencore/logging.h> #include <zenhttp/auth/oidc.h> +#include <zenutil/basicfile.h> #include <condition_variable> #include <memory> @@ -76,7 +77,7 @@ namespace details { return; } - WriteFile(Path, IoBuffer(IoBuffer::Wrap, EncryptedView.GetData(), EncryptedView.GetSize())); + TemporaryFile::SafeWriteFile(Path, EncryptedView); } } // namespace details |