summaryrefslogtreecommitdiff
path: root/wsd
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2020-06-25 21:55:30 -0400
committerAshod Nakashian <ashnakash@gmail.com>2020-07-01 07:42:46 +0200
commite93f7039c13d2b5326d22eaf14a6e801eba0cb9a (patch)
tree071cde2aa0e7e356f2ff3934a17baa7bdf211779 /wsd
parenta77208ddfba03faf2df575d9a43cc21d65f93fd0 (diff)
wsd: anonymize the filename only when anonymization is enabled
Change-Id: I0649788d38492b66aeb9cc4716dcbd23cd76cb4e Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97190 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'wsd')
-rw-r--r--wsd/DocumentBroker.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 4b3a61d39..8a41a6dd9 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1002,9 +1002,13 @@ bool DocumentBroker::saveToStorageInternal(const std::string& sessionId, bool su
const std::string newFilename = Util::getFilenameFromURL(uri);
const std::string fileId = Util::getFilenameFromURL(_docKey);
if (LOOLWSD::AnonymizeUserData)
- LOG_DBG("New filename [" << LOOLWSD::anonymizeUrl(newFilename) << "] will be known by its fileId [" << fileId << ']');
+ {
+ LOG_DBG("New filename [" << LOOLWSD::anonymizeUrl(newFilename)
+ << "] will be known by its fileId [" << fileId << ']');
+
+ Util::mapAnonymized(newFilename, fileId);
+ }
- Util::mapAnonymized(newFilename, fileId);
const std::string uriAnonym = LOOLWSD::anonymizeUrl(uri);
// If the file timestamp hasn't changed, skip saving.