summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2023-12-01 08:35:51 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2024-01-15 21:07:27 +0100
commit440dec9a7e854d7d3dced73625db52796700d8e6 (patch)
tree94d9d3dd0ee0a0605b245ca6f70c4f6edc8a7520 /desktop
parente727fc495a8e1bf423105e983ce194924e8ad618 (diff)
lok: external data source list
Make possible to filter allowed data sources. It is used for WebDAV curl, WEBSERVICE function, cell external references. Change-Id: Ifc82af31ff1123b5656a21e6a27624fb1616db39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160196 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161772 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 58e0f2d64413..6d141aeca865 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -236,6 +236,8 @@
#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
#include <svtools/acceleratorexecute.hxx>
+#include <tools/hostfilter.hxx>
+
using namespace css;
using namespace vcl;
using namespace desktop;
@@ -7763,6 +7765,12 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
}
#endif
+ char* pAllowlist = ::getenv("LOK_HOST_ALLOWLIST");
+ if (pAllowlist)
+ {
+ HostFilter::setAllowedHostsRegex(pAllowlist);
+ }
+
// What stage are we at ?
if (pThis == nullptr)
{