diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2021-08-10 04:02:41 -0400 |
---|---|---|
committer | Ashod Nakashian <Ashod@users.noreply.github.com> | 2021-09-26 17:02:01 -0400 |
commit | ff1ff1266351ce8ccc46f045fb03e1dec8d8c093 (patch) | |
tree | 97307b2b8c7bedcb4dfe6339149aa368928a48e9 /wsd | |
parent | wsd: log stopping-although-modified as warning (diff) | |
download | online-ff1ff1266351ce8ccc46f045fb03e1dec8d8c093.tar.gz online-ff1ff1266351ce8ccc46f045fb03e1dec8d8c093.zip |
wsd: each view handles its own url params
Change-Id: I0c6b9b86c970b1f45e7fa34d030f08c6f256d082
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit d4aa0a0f73eef5a90a14a2297f3050c1dba95a2d)
Diffstat (limited to 'wsd')
-rw-r--r-- | wsd/DocumentBroker.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index db26a9190d..a83bb794c1 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -1511,7 +1511,17 @@ void DocumentBroker::handleUploadToStorageResponse(const StorageBase::UploadResu { // encode the name const std::string& filename = uploadResult.getSaveAsName(); - const std::string url = Poco::URI(uploadResult.getSaveAsUrl()).toString(); + auto uri = Poco::URI(uploadResult.getSaveAsUrl()); + + // Remove the access_token, which belongs to the renaming user. + Poco::URI::QueryParameters queryParams = uri.getQueryParameters(); + queryParams.erase(std::remove_if(queryParams.begin(), queryParams.end(), + [](const std::pair<std::string, std::string>& pair) + { return pair.first == "access_token"; }), + queryParams.end()); + uri.setQueryParameters(queryParams); + + const std::string url = uri.toString(); std::string encodedName; Poco::URI::encode(filename, "", encodedName); const std::string filenameAnonym = LOOLWSD::anonymizeUrl(filename); |