loolwsd/DocumentBroker.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 0c44eeb39a8401c9430556f7ee3da155f03f0371 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sat Nov 19 09:50:42 2016 -0500 loolwsd: support loading same document from aliased hosts Change-Id: Ib46521dc05cb01fc4ca93d51671a75eab055e3cd Reviewed-on: https://gerrit.libreoffice.org/30998 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp index 1b35377..95fdd4d 100644 --- a/loolwsd/DocumentBroker.cpp +++ b/loolwsd/DocumentBroker.cpp @@ -131,9 +131,15 @@ Poco::URI DocumentBroker::sanitizeURI(const std::string& uri) std::string DocumentBroker::getDocKey(const Poco::URI& uri) { - // Keep the host as part of the key to close a potential security hole. + // If multiple host-names are used to access us, then + // they must be aliases. Permission to access aliased hosts + // is checked at the point of accepting incoming connections. + // At this point storing the hostname artificially discriminates + // between aliases and forces same document (when opened from + // alias hosts) to load as separate documents and sharing doesn't + // work. Worse, saving overwrites one another. std::string docKey; - Poco::URI::encode(uri.getHost() + uri.getPath(), "", docKey); + Poco::URI::encode(uri.getPath(), "", docKey); return docKey; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits