diff options
author | Eike Rathke <erack@redhat.com> | 2019-06-14 21:53:18 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2019-06-14 23:54:46 +0200 |
commit | e2f7211e9ef70ef9696175e9447edc3e779b3cc6 (patch) | |
tree | 9ed31e89e2a5c3734f0e251258933cbacf410485 /sc/source | |
parent | 9e3ed3b9fc64882335586e9ff9c155f36a22ade2 (diff) |
Resolves: tdf#124251 do not treat internal "URI" as real path URI
Change-Id: I754704b0a979e8449b7ec799cbda58b14ab17098
Reviewed-on: https://gerrit.libreoffice.org/74067
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit ca08ec9292410c28713fd2d92920a7af09883e97)
Reviewed-on: https://gerrit.libreoffice.org/74069
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/global.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index f0a3715f36b0..33e4ffb13eef 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -812,7 +812,14 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget) } // Don't fiddle with fragments pointing into current document. - if (!aUrlName.startsWith("#")) + // Also don't mess around with a vnd.sun.star.script or service or other + // internal "URI". + if (!aUrlName.startsWith("#") + && !aUrlName.startsWithIgnoreAsciiCase("vnd.sun.star.script:") + && !aUrlName.startsWithIgnoreAsciiCase("macro:") + && !aUrlName.startsWithIgnoreAsciiCase("slot:") + && !aUrlName.startsWithIgnoreAsciiCase("service:") + && !aUrlName.startsWithIgnoreAsciiCase(".uno:")) { // Any relative reference would fail with "not an absolute URL" // error, try to construct an absolute URI with the path relative |