[Libreoffice-commits] online.git: Branch 'distro/cib/libreoffice-6-2' - 3 commits - .gitreview loleaflet/src wsd/ClientSession.cpp

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 5 08:54:37 UTC 2019


 .gitreview                            |    2 +-
 loleaflet/src/map/handler/Map.WOPI.js |    2 +-
 wsd/ClientSession.cpp                 |    6 ++++--
 3 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 90bc3b8021e59a02324a0004a6f8106b8580d6c8
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Jun 5 10:54:07 2019 +0200
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Jun 5 10:54:07 2019 +0200

    .gitreview: Update default branch

diff --git a/.gitreview b/.gitreview
index b89dcd89d..ef326068a 100644
--- a/.gitreview
+++ b/.gitreview
@@ -3,5 +3,5 @@ host=logerrit
 port=29418
 project=online
 defaultremote=logerrit
-defaultbranch=libreoffice-6-2
+defaultbranch=distro/cib/libreoffice-6-2
 
commit 7e165e578c60ade6209315e741ced5251d5177fd
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Thu May 23 17:55:01 2019 +0100
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Jun 5 10:53:35 2019 +0200

    Make renamefile more careful.
    
    Change-Id: If39353fc01ea48d8e0077b228a6281839dde5c87
    Reviewed-on: https://gerrit.libreoffice.org/72877
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 56dd06f2cf30de858e800a81f83437ae83f38070)

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 9797d73bb..a1e6c9319 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -217,8 +217,10 @@ bool ClientSession::_handleInput(const char *buffer, int length)
 
         return true;
     }
-    else if (tokens[0] == "versionrestore") {
-        if (tokens[1] == "prerestore") {
+    else if (tokens[0] == "versionrestore")
+    {
+        if (tokens.size() > 1 && tokens[1] == "prerestore")
+        {
             // green signal to WOPI host to restore the version *after* saving
             // any unsaved changes, if any, to the storage
             docBroker->closeDocument("versionrestore: prerestore_ack");
commit 5d97ef0c6be89f7041475126ecabbaa1cfb656e2
Author:     Alexandru Vlăduţu <alexandru.vladutu at 1and1.ro>
AuthorDate: Wed May 15 10:46:11 2019 +0300
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Jun 5 10:53:24 2019 +0200

    loleaflet: add postmessage check
    
    Checks if messages are coming from the parent only (the frame which
    opened the editor) to avoid unwanted commands from 3rd parties.
    
    Change-Id: Ieffe36169dcefbe130869596672c1628c76b6799
    Reviewed-on: https://gerrit.libreoffice.org/72340
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit e1c2c2e3c5b16990c156ea795d68f365deb30253)
    Reviewed-on: https://gerrit.libreoffice.org/73022
    (cherry picked from commit 40608eab166a65487edd1e5de98223d13713ba37)

diff --git a/loleaflet/src/map/handler/Map.WOPI.js b/loleaflet/src/map/handler/Map.WOPI.js
index 654b2a51c..2c343055f 100644
--- a/loleaflet/src/map/handler/Map.WOPI.js
+++ b/loleaflet/src/map/handler/Map.WOPI.js
@@ -124,7 +124,7 @@ L.Map.WOPI = L.Handler.extend({
 	},
 
 	_postMessageListener: function(e) {
-		if (!window.WOPIPostmessageReady) {
+		if (!window.WOPIPostmessageReady || (e.origin !== window.parent.origin)) {
 			return;
 		}
 


More information about the Libreoffice-commits mailing list