[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - 3 commits - scripting/source sfx2/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 27 13:09:21 UTC 2019


 scripting/source/pyprov/pythonscript.py |    5 +++++
 sfx2/source/doc/objmisc.cxx             |    2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 849571e735e1091cff56ad24066cae11bfe474c7
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Aug 26 10:18:09 2019 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Aug 27 12:32:45 2019 +0200

    Improve check
    
    Change-Id: I8280a81eef2ced0ff0ace51ea9f094421abafe13
    Reviewed-on: https://gerrit.libreoffice.org/78108
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    (cherry picked from commit 761e6dd25782420bf06e4a2ff3205a79b6cbb136)
    Reviewed-on: https://gerrit.libreoffice.org/78129
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit ffad51e9e625a22f1efab3da7886baf4134b444f)

diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index de0a6153675d..0c9d1a8f7e42 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1370,7 +1370,7 @@ bool SfxObjectShell::UnTrustedScript(const OUString& rScriptURL)
     do
     {
         OUString aToken = sScript.getToken(0, '/', nIndex);
-        if (aToken.startsWithIgnoreAsciiCase("LibreLogo"))
+        if (aToken.startsWithIgnoreAsciiCase("LibreLogo") || aToken.indexOf('~') != -1)
         {
             return true;
         }
commit 4662f840e7db9e0b95979f622e3c94cf8bc42ade
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Aug 19 11:27:15 2019 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Aug 27 12:32:45 2019 +0200

    Improve check for absolute URI
    
    Change-Id: I4dee44832107f72f8f3fb68554428dc1e646c346
    Reviewed-on: https://gerrit.libreoffice.org/77706
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    (cherry picked from commit c79efeb66f7951305d0334bc288aee1c571a8728)
    Reviewed-on: https://gerrit.libreoffice.org/77724
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 52f7aa318722bd17c77ee5c4fa8307936e7b53af)

diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index d8924f8dba8c..acb6184bf437 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -237,7 +237,7 @@ class MyUriHelper:
                 log.debug( message )
                 raise RuntimeException( message )
 
-            if xFileUri.isAbsolute():
+            if not xFileUri.hasRelativePath():
                 message = "pythonscript: an absolute uri is invalid '" + sFileUri+ "'"
                 log.debug( message )
                 raise RuntimeException( message )
commit d6c423e2ea0fec962c7b7da446f67c4938bc1437
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Aug 16 10:18:34 2019 +0100
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Aug 27 12:32:45 2019 +0200

    an absolute uri is invalid input
    
    Change-Id: I392be4282be8ed67e3451b28d2c9f22acd4c87fc
    Reviewed-on: https://gerrit.libreoffice.org/77564
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Stephan Bergmann <sbergman at redhat.com>
    (cherry picked from commit 3c076e54f736980e208f5c27ecf179aa90aea103)
    Reviewed-on: https://gerrit.libreoffice.org/77572
    Tested-by: Jenkins
    (cherry picked from commit 5445f7ffd09e891b220dabb19cd013bcf591fc08)

diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index 0f74852523b3..d8924f8dba8c 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -237,6 +237,11 @@ class MyUriHelper:
                 log.debug( message )
                 raise RuntimeException( message )
 
+            if xFileUri.isAbsolute():
+                message = "pythonscript: an absolute uri is invalid '" + sFileUri+ "'"
+                log.debug( message )
+                raise RuntimeException( message )
+
             # absolute path to the .py file
             xAbsScriptUri = self.m_uriRefFac.makeAbsolute(xBaseUri, xFileUri, True, RETAIN)
             sAbsScriptUri = xAbsScriptUri.getUriReference()


More information about the Libreoffice-commits mailing list