summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-08-16 10:18:34 +0100
committerAndras Timar <andras.timar@collabora.com>2021-10-11 00:05:58 +0200
commitb166eaf3de310dadeb67b72373315070024dfe16 (patch)
treee05fd90cc6f14a6124884b1593724bb956d92b48
parentconstruct final url from parsed output (diff)
downloadcore-b166eaf3de310dadeb67b72373315070024dfe16.tar.gz
core-b166eaf3de310dadeb67b72373315070024dfe16.zip
an absolute uri is invalid input
Change-Id: I392be4282be8ed67e3451b28d2c9f22acd4c87fc Reviewed-on: https://gerrit.libreoffice.org/77564 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 3c076e54f736980e208f5c27ecf179aa90aea103) Reviewed-on: https://gerrit.libreoffice.org/77572 Tested-by: Jenkins (cherry picked from commit 5445f7ffd09e891b220dabb19cd013bcf591fc08) Reviewed-on: https://gerrit.libreoffice.org/78145 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de>
-rw-r--r--scripting/source/pyprov/pythonscript.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index 316c5012cf31..a5ef31a4bf12 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()