summaryrefslogtreecommitdiffstats
path: root/wsd/LOOLWSD.hpp
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2020-01-17 22:31:41 +0000
committerMichael Meeks <michael.meeks@collabora.com>2020-01-18 20:05:35 +0100
commite6a3364e9367bbf833ab4bf2265a04ee8c010324 (patch)
tree574213cfd6abbd67e5d50ef73398ca14112b170a /wsd/LOOLWSD.hpp
parentCleanup JWTAuth token before shutdown. (diff)
downloadonline-e6a3364e9367bbf833ab4bf2265a04ee8c010324.tar.gz
online-e6a3364e9367bbf833ab4bf2265a04ee8c010324.zip
Move file url anonymization down from LOOLWSD into FileUtil.
Change-Id: I415c73b10621d5c7c942367bbf38a3bbd9bf8f27 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87024 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'wsd/LOOLWSD.hpp')
-rw-r--r--wsd/LOOLWSD.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp
index 6e35bd7965..71ddb21550 100644
--- a/wsd/LOOLWSD.hpp
+++ b/wsd/LOOLWSD.hpp
@@ -24,6 +24,7 @@
#include <Poco/Util/ServerApplication.h>
#include "Util.hpp"
+#include "FileUtil.hpp"
class ChildProcess;
class TraceFileWriter;
@@ -67,7 +68,6 @@ public:
static std::string HostIdentifier; ///< A unique random hash that identifies this server
static std::string LogLevel;
static bool AnonymizeUserData;
- static std::uint64_t AnonymizationSalt;
static std::atomic<unsigned> NumConnections;
static std::unique_ptr<TraceFileWriter> TraceDumper;
#if !MOBILEAPP
@@ -184,14 +184,14 @@ public:
/// Anonymize the basename of filenames, preserving the path and extension.
static std::string anonymizeUrl(const std::string& url)
{
- return AnonymizeUserData ? Util::anonymizeUrl(url, AnonymizationSalt) : url;
+ return FileUtil::anonymizeUrl(url);
}
/// Anonymize user names and IDs.
/// Will use the Obfuscated User ID if one is provied via WOPI.
static std::string anonymizeUsername(const std::string& username)
{
- return AnonymizeUserData ? Util::anonymize(username, AnonymizationSalt) : username;
+ return FileUtil::anonymizeUsername(username);
}
/// get correct server URL with protocol + port number for this running server