summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2023-11-27 09:56:27 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2023-12-20 16:00:44 +0100
commitdee13501d67ac544c090d68c95c9a9df75f8bf27 (patch)
treedca37a9fa625ca118184ec329045b092eca68ac0 /sc/source/core
parent2e4b6aac3e3d07552710d7394cc7d65f1a8c79c8 (diff)
lok: Block requests to load external references
- currently in LOK case we don't open multiple files in one "environment" - currently it opens import dialog which is synchronous - and that blocks whole app Change-Id: I11c2c7f602ecf1e29b3d6fb2930ce873749bc2ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159984 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161058 Tested-by: Jenkins
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/tool/webservicelink.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/core/tool/webservicelink.cxx b/sc/source/core/tool/webservicelink.cxx
index b61907471e54..156048430636 100644
--- a/sc/source/core/tool/webservicelink.cxx
+++ b/sc/source/core/tool/webservicelink.cxx
@@ -7,6 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <sfx2/linkmgr.hxx>
#include <sfx2/bindings.hxx>
@@ -36,6 +37,13 @@ sfx2::SvBaseLink::UpdateResult ScWebServiceLink::DataChanged(const OUString&, co
aResult.clear();
bHasResult = false;
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ SAL_WARN("sc.ui", "ScWebServiceLink::DataChanged: blocked access to external file: \""
+ << aURL << "\"");
+ return ERROR_GENERAL;
+ }
+
css::uno::Reference<css::ucb::XSimpleFileAccess3> xFileAccess
= css::ucb::SimpleFileAccess::create(comphelper::getProcessComponentContext());
if (!xFileAccess.is())