scripting/source/pyprov/pythonscript.py | 5 +++++ sfx2/source/doc/objmisc.cxx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)
New commits: commit a65f8429df8862e1f779274cbd99b6ce4348f1a6 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Mon Aug 26 10:18:09 2019 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Sat Oct 19 20:07:43 2019 +0200 Improve check Change-Id: I8280a81eef2ced0ff0ace51ea9f094421abafe13 Reviewed-on: https://gerrit.libreoffice.org/78108 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> (cherry picked from commit 761e6dd25782420bf06e4a2ff3205a79b6cbb136) Reviewed-on: https://gerrit.libreoffice.org/78129 Reviewed-by: Michael Stahl <michael.st...@cib.de> diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index a508aea86e12..3ec10565bc05 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1371,7 +1371,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 f2ef328c0cff0f5ebd2d677bc299c86e4c17360e Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Mon Aug 19 11:27:15 2019 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Sat Oct 19 20:07:14 2019 +0200 Improve check for absolute URI Change-Id: I4dee44832107f72f8f3fb68554428dc1e646c346 Reviewed-on: https://gerrit.libreoffice.org/77706 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> (cherry picked from commit c79efeb66f7951305d0334bc288aee1c571a8728) Reviewed-on: https://gerrit.libreoffice.org/77724 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py index 9b61ba628b07..969a004abf08 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 7b13791ede95f3fab221d2f5c482bc63dabbd9eb Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Aug 16 10:18:34 2019 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Sat Oct 19 20:06:34 2019 +0200 an absolute uri is invalid input Change-Id: I392be4282be8ed67e3451b28d2c9f22acd4c87fc Reviewed-on: https://gerrit.libreoffice.org/77564 Reviewed-by: Stephan Bergmann <sberg...@redhat.com> Tested-by: Stephan Bergmann <sberg...@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 fb28fe6f03bd..9b61ba628b07 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() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits