[Libreoffice-commits] online.git: test/integration-http-server.cpp wsd/LOOLWSD.cpp wsd/Storage.cpp wsd/Storage.hpp

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Oct 20 10:56:22 UTC 2018


 test/integration-http-server.cpp |    1 -
 wsd/LOOLWSD.cpp                  |    4 ++--
 wsd/Storage.cpp                  |    5 -----
 wsd/Storage.hpp                  |    2 --
 4 files changed, 2 insertions(+), 10 deletions(-)

New commits:
commit 343ba48d27d6cc3bacf6d7927d9b615cd2cf98ce
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Sat Oct 20 12:55:55 2018 +0200
Commit:     Tamás Zolnai <tamas.zolnai at collabora.com>
CommitDate: Sat Oct 20 12:55:55 2018 +0200

    Revert "Enable convert-to features for wopi hosts"
    
    This reverts commit 8dd28ed6649bbd9506ca097547f898e5d4f1bddd.

diff --git a/test/integration-http-server.cpp b/test/integration-http-server.cpp
index ef8476c9e..e8eb1197e 100644
--- a/test/integration-http-server.cpp
+++ b/test/integration-http-server.cpp
@@ -173,7 +173,6 @@ void HTTPServerTest::testCapabilities()
 
         Poco::JSON::Object::Ptr convert_to = features->get("convert-to").extract<Poco::JSON::Object::Ptr>();
         CPPUNIT_ASSERT(convert_to->has("available"));
-        CPPUNIT_ASSERT(convert_to->get("available"));
     }
 }
 
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 4e87c6125..90c3e31ba 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2256,7 +2256,7 @@ private:
 
             std::string format = (form.has("format") ? form.get("format") : "");
 
-            if (!allowPostFrom(socket->clientAddress()) || StorageBase::alowedWopiHost(socket->clientAddress()) )
+            if (!allowPostFrom(socket->clientAddress()))
             {
                 LOG_ERR("client address DENY: " << socket->clientAddress());
 
@@ -2717,7 +2717,7 @@ private:
         Poco::JSON::Object::Ptr features = jsonFile.extract<Poco::JSON::Object::Ptr>();
         Poco::JSON::Object::Ptr convert_to = features->get("convert-to").extract<Poco::JSON::Object::Ptr>();
 
-        Poco::Dynamic::Var available = allowPostFrom(socket->clientAddress()) || StorageBase::alowedWopiHost(socket->clientAddress());
+        Poco::Dynamic::Var available = allowPostFrom(socket->clientAddress());
         convert_to->set("available", available);
 
         std::ostringstream ostrJSON;
diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index 722893abd..3ceaf673e 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -141,11 +141,6 @@ void StorageBase::initialize()
 #endif
 }
 
-bool StorageBase::alowedWopiHost(const std::string& uri)
-{
-    return WopiEnabled && WopiHosts.match(Poco::URI(uri).getHost());
-}
-
 #ifndef MOBILEAPP
 
 bool isLocalhost(const std::string& targetHost)
diff --git a/wsd/Storage.hpp b/wsd/Storage.hpp
index a2025a4fd..1e9544c2e 100644
--- a/wsd/Storage.hpp
+++ b/wsd/Storage.hpp
@@ -174,8 +174,6 @@ public:
     static std::unique_ptr<StorageBase> create(const Poco::URI& uri,
                                                const std::string& jailRoot,
                                                const std::string& jailPath);
-
-    static bool alowedWopiHost(const std::string& uri);
 protected:
 
     /// Returns the root path of the jail directory of docs.


More information about the Libreoffice-commits mailing list