91334d
From 1686c4273b8e0b8218853669e50d4bf405525dde Mon Sep 17 00:00:00 2001
91334d
From: Stephan Bergmann <sbergman@redhat.com>
91334d
Date: Mon, 26 Aug 2019 10:18:09 +0200
91334d
Subject: [PATCH 2/2] Improve check
91334d
91334d
Change-Id: I8280a81eef2ced0ff0ace51ea9f094421abafe13
91334d
Reviewed-on: https://gerrit.libreoffice.org/78108
91334d
Tested-by: Jenkins
91334d
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
91334d
(cherry picked from commit 761e6dd25782420bf06e4a2ff3205a79b6cbb136)
91334d
Reviewed-on: https://gerrit.libreoffice.org/78129
91334d
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
91334d
(cherry picked from commit ffad51e9e625a22f1efab3da7886baf4134b444f)
91334d
---
91334d
 sfx2/source/doc/objmisc.cxx | 2 +-
91334d
 1 file changed, 1 insertion(+), 1 deletion(-)
91334d
91334d
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
91334d
index 9b82742302ab..4f2a05909a74 100644
91334d
--- a/sfx2/source/doc/objmisc.cxx
91334d
+++ b/sfx2/source/doc/objmisc.cxx
91334d
@@ -1370,7 +1370,7 @@ bool SfxObjectShell::UnTrustedScript(const OUString& rScriptURL)
91334d
     do
91334d
     {
91334d
         OUString aToken = sScript.getToken(0, '/', nIndex);
91334d
-        if (aToken.startsWithIgnoreAsciiCase("LibreLogo"))
91334d
+        if (aToken.startsWithIgnoreAsciiCase("LibreLogo") || aToken.indexOf('~') != -1)
91334d
         {
91334d
             return true;
91334d
         }
91334d
-- 
91334d
2.21.0
91334d