expand pyuno path separators
authorCaolán McNamara <caolanm@redhat.com>
Wed, 7 Aug 2019 11:58:01 +0000 (12:58 +0100)
committerRene Engelhard <rene@debian.org>
Thu, 31 Oct 2019 17:26:41 +0000 (17:26 +0000)
Change-Id: Ic97649ed6d4be595b308922c7bdc880cbb60b239
Reviewed-on: https://gerrit.libreoffice.org/77102
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 75903a0298218f89a199a5ac151ee0166f4469d7)
Reviewed-on: https://gerrit.libreoffice.org/77116

Gbp-Pq: Name expand-pyuno-path-separators.diff

sfx2/source/doc/objmisc.cxx

index fbe7ba9da3ed542b723742ef7620d43efa19d229..de0a6153675d20036186e96126585f17463e90c0 100644 (file)
@@ -1362,7 +1362,8 @@ bool SfxObjectShell::UnTrustedScript(const OUString& rScriptURL)
     if (!sfUri.is())
         return false;
 
-    OUString sScript = sfUri->getName();
+    // pyuno encodes path separator as |
+    OUString sScript = sfUri->getName().replace('|', '/');
 
     // check if any path portion matches LibreLogo and ban it if it does
     sal_Int32 nIndex = 0;