[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - scripting/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Aug 16 15:26:57 UTC 2019


 scripting/source/pyprov/pythonscript.py |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 5445f7ffd09e891b220dabb19cd013bcf591fc08
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Aug 16 10:18:34 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Aug 16 17:26:19 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

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