[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 1 05:43:07 UTC 2020


 wsd/DocumentBroker.cpp |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit e93f7039c13d2b5326d22eaf14a6e801eba0cb9a
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Thu Jun 25 21:55:30 2020 -0400
Commit:     Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Wed Jul 1 07:42:46 2020 +0200

    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 at gmail.com>
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>

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.


More information about the Libreoffice-commits mailing list