[Libreoffice-commits] online.git: Branch 'libreoffice-6-2' - wsd/FileServer.cpp

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Nov 29 09:13:58 UTC 2018


 wsd/FileServer.cpp |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 583e7d610a9c4a22d121b281aefe6eb1fac03df6
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Nov 28 09:36:24 2018 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Nov 29 10:13:40 2018 +0100

    Only add the host to frame-ancestors
    
    not the whole URL with all parameters
    
    Change-Id: I42e3a6a4c05410284afea51bb13ac3f692b243ef
    Reviewed-on: https://gerrit.libreoffice.org/64147
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 8f1abe48397d7da4629fb50324289ad39102cfc7)
    Reviewed-on: https://gerrit.libreoffice.org/64149
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 23ec0f441..318a9ff98 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -695,6 +695,9 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request, Poco::
         {
             std::string wopiFrameAncestor;
             Poco::URI::decode(param.second, wopiFrameAncestor);
+            Poco::URI uriWopiFrameAncestor(wopiFrameAncestor);
+            // Remove parameters from URL
+            wopiFrameAncestor = uriWopiFrameAncestor.getHost();
             if (wopiFrameAncestor != uriHost.getHost() && wopiFrameAncestor != configFrameAncestor)
             {
                 frameAncestors += " " + wopiFrameAncestor;


More information about the Libreoffice-commits mailing list