[Libreoffice-commits] core.git: Branch 'feature/cib_contract136' - 107 commits - bin/distro-install-file-lists canvas/source config_host.mk.in configure.ac desktop/unx download.lst extensions/Library_so_activex_x64.mk external/curl external/lcms2 external/libmwaw external/libwpd external/libxml2 external/libxslt external/mdnsresponder external/Module_external.mk external/msc-externals external/nss external/openssl external/poppler external/python3 external/python33 include/o3tl include/sfx2 instsetoo_native/inc_openoffice librelogo/source officecfg/Configuration_officecfg.mk officecfg/registry package/source postprocess/CustomTarget_registry.mk postprocess/CustomTarget_signing.mk postprocess/signing pyuno/source RepositoryExternal.mk Repository.mk RepositoryModule_host.mk sal/osl sax/source scp2/AutoInstall.mk scp2/InstallModule_python.mk scp2/InstallModule_windows.mk scp2/source scripting/source sdext/source setup_native/Library_inst_msu_msi.mk setup_native/Module_setup_native.mk setup_native/so urce sfx2/source shell/source solenv/bin solenv/gbuild solenv/gcc-wrappers solenv/gdb svl/source sw/inc sw/qa sw/source xmloff/source xmlsecurity/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Mon Aug 26 15:41:12 UTC 2019
Rebased ref, commits from common ancestor:
commit 06f518861653c2edfaae642da404f01624becdd5
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: Mon Aug 26 17:34:09 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 d9203abc5f9e..e6a19f585379 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1485,7 +1485,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 9841cd4568500de609c1e7c833c359466949565f
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: Mon Aug 26 17:34:09 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 ed85173cccc1..adc15cc150eb 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -230,7 +230,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 467da9d46987c062b6f8da14896ea8b3b9489ee2
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: Mon Aug 26 17:34:09 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 6625b226f609..ed85173cccc1 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -230,6 +230,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()
commit 12d393ebd8503d9cc4a8843e8468a80b297e812c
Author: Michael Stahl <mstahl at redhat.com>
AuthorDate: Fri Sep 29 16:53:35 2017 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:08 2019 +0200
gdb pretty-printers: fix StringPrinterHelper for gdb 8.0
Latest gdb release "lazy_string" validates the array size:
Traceback (most recent call last):
File "/work/lo/master/solenv/gdb/libreoffice/util/string.py", line
29, in to_string
return self.make_string(data, self.encoding, len)
File "/work/lo/master/solenv/gdb/libreoffice/util/string.py", line
66, in make_string
return data.lazy_string(encoding, length)
gdb.error: Length is larger than array size.
rtl_uString has "sal_Unicode buffer[1];", which is a lie
as the real size is the same as "length".
Taking the address of "buffer" appears to avoid the exception.
Change-Id: I85710b1adfae584ba09c8d517e9b49b290e79d8a
(cherry picked from commit 205677c88cb01e2bbee278443867baed2c89e5fe)
(cherry picked from commit 8c3874409539440cae7eda4ab74f2b73f272fbe1)
diff --git a/solenv/gdb/libreoffice/sal.py b/solenv/gdb/libreoffice/sal.py
index c2e8384537be..8dcfaebe66e1 100644
--- a/solenv/gdb/libreoffice/sal.py
+++ b/solenv/gdb/libreoffice/sal.py
@@ -21,7 +21,7 @@ class RtlStringPrinter(StringPrinterHelper):
super(RtlStringPrinter, self).__init__(typename, val, encoding)
def data(self):
- return self.val['buffer']
+ return self.val['buffer'].address
def length(self):
return self.val['length']
@@ -37,7 +37,7 @@ class StringPrinter(StringPrinterHelper):
def data(self):
assert self.val['pData']
- return self.val['pData'].dereference()['buffer']
+ return self.val['pData'].dereference()['buffer'].address
def length(self):
assert self.val['pData']
diff --git a/solenv/gdb/libreoffice/util/string.py b/solenv/gdb/libreoffice/util/string.py
index 4583f5960ae1..9f7cb70028b5 100644
--- a/solenv/gdb/libreoffice/util/string.py
+++ b/solenv/gdb/libreoffice/util/string.py
@@ -52,15 +52,15 @@ class StringPrinterHelper(object):
if not encoding:
encoding = ''
- if use_lazy_string:
- return data.lazy_string(encoding, length)
-
# we need to determine length, if not given (for sal_Unicode*)
if length < 0:
length = 0
while data[length] != 0 and length <= 512: # arbitrary limit
length += 1
+ if use_lazy_string:
+ return data.lazy_string(encoding, length)
+
# The gdb.Value.string() conversion works on array of bytes, but
# the length we have is the length of the string. So we must
# multiply it by width of character if the string is Unicode.
commit f501c61711205d5990c522688936db1e71bb3a5f
Author: Luke Deller <luke at deller.id.au>
AuthorDate: Wed Jul 12 23:56:50 2017 +1000
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:08 2019 +0200
tdf#109080 First page header/footer ODF (1/2)
The proposal to add <style:header-first> / <style:footer-first>
to the ODF standard has not yet been accepted, so meanwhile we
should be using an extension namespace for these elements.
This first commit (intended for backport) adds support for reading
<loext:header-first> / <loext:footer-first>
(cherry picked from commit bff8cd3d52223002263dcb8c09758c4fc753b6e3)
Reviewed-on: https://gerrit.libreoffice.org/40227
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Jenkins <ci at libreoffice.org>
(cherry picked from commit c027764f94a1fc0a367e03b412d3c11d6c10769c)
Conflicts:
sw/qa/extras/odfimport/odfimport.cxx
Change-Id: I616b6a0acaead9d767ae7d119e539b865f3a6774
diff --git a/sw/qa/extras/odfimport/data/tdf109080_loext_ns.odt b/sw/qa/extras/odfimport/data/tdf109080_loext_ns.odt
new file mode 100644
index 000000000000..ac7b3e272acc
Binary files /dev/null and b/sw/qa/extras/odfimport/data/tdf109080_loext_ns.odt differ
diff --git a/sw/qa/extras/odfimport/data/tdf109080_style_ns.odt b/sw/qa/extras/odfimport/data/tdf109080_style_ns.odt
new file mode 100644
index 000000000000..ada290dc5fe1
Binary files /dev/null and b/sw/qa/extras/odfimport/data/tdf109080_style_ns.odt differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 92069c00808c..fef7eb109e9b 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -646,5 +646,36 @@ DECLARE_ODFIMPORT_TEST(testTdf96113, "tdf96113.odt")
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00ff00), getProperty<sal_Int32>(getShape(1), "BackColor"));
}
+DECLARE_ODFIMPORT_TEST(testTdf109080_loext_ns, "tdf109080_loext_ns.odt")
+{
+ // Test we can import <loext:header-first> and <loext:footer-first>
+
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the first page header"),
+ parseDump("/root/page[1]/header/txt/text()"));
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the non-first-page header"),
+ parseDump("/root/page[2]/header/txt/text()"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the first page footer"),
+ parseDump("/root/page[1]/footer/txt/text()"));
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the non-first-page footer"),
+ parseDump("/root/page[2]/footer/txt/text()"));
+}
+
+DECLARE_ODFIMPORT_TEST(testTdf109080_style_ns, "tdf109080_style_ns.odt")
+{
+ // Test we can import <style:header-first> and <style:footer-first>
+ // (produced by LibreOffice 4.0 - 5.x)
+
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the first page header"),
+ parseDump("/root/page[1]/header/txt/text()"));
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the non-first-page header"),
+ parseDump("/root/page[2]/header/txt/text()"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the first page footer"),
+ parseDump("/root/page[1]/footer/txt/text()"));
+ CPPUNIT_ASSERT_EQUAL(OUString("This is the non-first-page footer"),
+ parseDump("/root/page[2]/footer/txt/text()"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 08dafafdcbfe..3158e272a58a 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -407,6 +407,8 @@ static const SvXMLTokenMapEntry aTextMasterPageElemTokenMap[] =
{ XML_NAMESPACE_STYLE, XML_FOOTER, XML_TOK_TEXT_MP_FOOTER },
{ XML_NAMESPACE_STYLE, XML_HEADER_LEFT, XML_TOK_TEXT_MP_HEADER_LEFT },
{ XML_NAMESPACE_STYLE, XML_FOOTER_LEFT, XML_TOK_TEXT_MP_FOOTER_LEFT },
+ { XML_NAMESPACE_LO_EXT, XML_HEADER_FIRST, XML_TOK_TEXT_MP_HEADER_FIRST },
+ { XML_NAMESPACE_LO_EXT, XML_FOOTER_FIRST, XML_TOK_TEXT_MP_FOOTER_FIRST },
{ XML_NAMESPACE_STYLE, XML_HEADER_FIRST, XML_TOK_TEXT_MP_HEADER_FIRST },
{ XML_NAMESPACE_STYLE, XML_FOOTER_FIRST, XML_TOK_TEXT_MP_FOOTER_FIRST },
commit 2979ea88afafbbc15af3e00f882ed266aac575cc
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Jul 12 15:01:41 2019 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:08 2019 +0200
NSS fix lcc support patch
This hangs the build process with current MSVC cl.exe. It even
hangs when just calling "cl -? >/dev/null". Probably
a cl.exe bug to detect redirection properly?
This adds stdin redirection to /dev/null, like in configure.ac checks.
Reviewed-on: https://gerrit.libreoffice.org/75495
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
(cherry picked from commit b11ea5e9c37b19f0d60a4075146668954a7bf728)
Change-Id: Ie03c3103ac68cd131dc280755621a8ce0417314f
Reviewed-on: https://gerrit.libreoffice.org/75514
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk
index a38e8cf1c52f..9c73fc696ce0 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -25,6 +25,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
external/nss/nss.mingw.patch.3) \
external/nss/ubsan.patch.0 \
external/nss/clang-cl.patch.0 \
+ external/nss/nss.fix-freebl-add-lcc-support.patch.1 \
$(if $(filter IOS,$(OS)), \
external/nss/nss-ios.patch) \
$(if $(filter MSC-INTEL,$(COM)-$(CPUNAME)), \
diff --git a/external/nss/nss.fix-freebl-add-lcc-support.patch.1 b/external/nss/nss.fix-freebl-add-lcc-support.patch.1
new file mode 100644
index 000000000000..3e3c06327dde
--- /dev/null
+++ b/external/nss/nss.fix-freebl-add-lcc-support.patch.1
@@ -0,0 +1,11 @@
+--- b/nss/lib/freebl/Makefile
++++ a/nss/lib/freebl/Makefile
+@@ -495,7 +495,7 @@
+ ifdef USE_64
+ # no __int128 at least up to lcc 1.23 (pretending to be gcc5)
+ # NB: CC_NAME is not defined here
+-ifneq ($(shell $(CC) -? 2>&1 >/dev/null | sed -e 's/:.*//;1q'),lcc)
++ifneq ($(shell $(CC) -? 2>&1 >/dev/null </dev/null | sed -e 's/:.*//;1q'),lcc)
+ ifdef CC_IS_CLANG
+ HAVE_INT128_SUPPORT = 1
+ DEFINES += -DHAVE_INT128_SUPPORT
commit 10495310096f1b2f15d57aa60d15de8f5afe8316
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Jul 10 12:20:00 2019 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:07 2019 +0200
nss: upgrade to release 3.45
Fixes CVE-2019-11729 CVE-2019-11719 CVE-2019-11727, and the less
important CVE-2018-12384 and CVE-2018-12404 from intermediate releases.
Since NSS 3.44 it's possible to build as static libraries and for iOS;
drop the nss-chromium-nss-static.patch and nss-more-static.patch and
hope that it works.
Drop one hunk from nss.patch that looks fixed upstream.
Change-Id: I7f37ac36f7f8dfd49d0bfb4a6185ca49d4f618a3
Reviewed-on: https://gerrit.libreoffice.org/75344
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit 6efc8a33f69bc7f4be45b7b81f67cd74c163b99e)
Reviewed-on: https://gerrit.libreoffice.org/75411
Tested-by: Michael Stahl <Michael.Stahl at cib.de>
diff --git a/download.lst b/download.lst
index 761d5bf28abb..70d73e76f35a 100644
--- a/download.lst
+++ b/download.lst
@@ -112,8 +112,8 @@ export MWAW_TARBALL := libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.bz2
export MYSQLCPPCONN_TARBALL := 7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz
export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
export NEON_TARBALL := 231adebe5c2f78fded3e3df6e958878e-neon-0.30.1.tar.gz
-export NSS_MD5SUM := cd649be8ee61fe15d64d7bef361b37ba
-export NSS_TARBALL := nss-3.38-with-nspr-4.19.tar.gz
+export NSS_MD5SUM := 2f7dab8f5b85b1494f6bec2cc32a1f5c
+export NSS_TARBALL := nss-3.45-with-nspr-4.21.tar.gz
export ODFGEN_MD5SUM := 32572ea48d9021bbd6fa317ddb697abc
export ODFGEN_VERSION_MICRO := 6
export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk
index 1a7ed1373230..a38e8cf1c52f 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -26,8 +26,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
external/nss/ubsan.patch.0 \
external/nss/clang-cl.patch.0 \
$(if $(filter IOS,$(OS)), \
- external/nss/nss-chromium-nss-static.patch \
- external/nss/nss-more-static.patch \
external/nss/nss-ios.patch) \
$(if $(filter MSC-INTEL,$(COM)-$(CPUNAME)), \
external/nss/nss.cygwin64.in32bit.patch) \
diff --git a/external/nss/clang-cl.patch.0 b/external/nss/clang-cl.patch.0
index 98786d49971c..7326c5a807d0 100644
--- a/external/nss/clang-cl.patch.0
+++ b/external/nss/clang-cl.patch.0
@@ -15,11 +15,11 @@
--- nspr/pr/include/prbit.h
+++ nspr/pr/include/prbit.h
@@ -14,7 +14,7 @@
- ** functions.
*/
#if defined(_WIN32) && (_MSC_VER >= 1300) && \
-- (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_ARM))
-+ (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_ARM)) && !defined __clang__
+ (defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM) || \
+- defined(_M_ARM64))
++ defined(_M_ARM64)) && !defined __clang__
# include <intrin.h>
# pragma intrinsic(_BitScanForward,_BitScanReverse)
__forceinline static int __prBitScanForward32(unsigned int val)
@@ -29,15 +29,15 @@
# define PR_HAVE_BUILTIN_BITSCAN32
-#elif ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) && \
+#elif defined __GNUC__ && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) && \
- (defined(__i386__) || defined(__x86_64__) || defined(__arm__))
+ (defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
+ defined(__aarch64__))
# define pr_bitscan_ctz32(val) __builtin_ctz(val)
- # define pr_bitscan_clz32(val) __builtin_clz(val)
@@ -136,7 +136,7 @@
*/
#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64) || \
-- defined(_M_X64) || defined(_M_ARM))
-+ defined(_M_X64) || defined(_M_ARM)) && !defined __clang__
+- defined(_M_X64) || defined(_M_ARM) || defined(_M_ARM64))
++ defined(_M_X64) || defined(_M_ARM) || defined(_M_ARM64)) && !defined __clang__
#include <stdlib.h>
#pragma intrinsic(_rotl, _rotr)
#define PR_ROTATE_LEFT32(a, bits) _rotl(a, bits)
diff --git a/external/nss/nss-chromium-nss-static.patch b/external/nss/nss-chromium-nss-static.patch
deleted file mode 100644
index 9d7a4e4352b1..000000000000
--- a/external/nss/nss-chromium-nss-static.patch
+++ /dev/null
@@ -1,487 +0,0 @@
-Based on http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/nss/patches/nss-static.patch
-
---- a/a/nss/lib/certhigh/certvfy.c Tue May 28 23:37:46 2013 +0200
-+++ a/a/nss/lib/certhigh/certvfy.c Fri May 31 17:44:06 2013 -0700
-@@ -13,9 +13,11 @@
- #include "certdb.h"
- #include "certi.h"
- #include "cryptohi.h"
-+#ifndef NSS_DISABLE_LIBPKIX
- #include "pkix.h"
- /*#include "pkix_sample_modules.h" */
- #include "pkix_pl_cert.h"
-+#endif /* NSS_DISABLE_LIBPKIX */
-
-
- #include "nsspki.h"
-@@ -24,6 +26,47 @@
- #include "pki3hack.h"
- #include "base.h"
-
-+#ifdef NSS_DISABLE_LIBPKIX
-+SECStatus
-+cert_VerifyCertChainPkix(
-+ CERTCertificate *cert,
-+ PRBool checkSig,
-+ SECCertUsage requiredUsage,
-+ PRTime time,
-+ void *wincx,
-+ CERTVerifyLog *log,
-+ PRBool *pSigerror,
-+ PRBool *pRevoked)
-+{
-+ PORT_SetError(PR_NOT_IMPLEMENTED_ERROR);
-+ return SECFailure;
-+}
-+
-+SECStatus
-+CERT_SetUsePKIXForValidation(PRBool enable)
-+{
-+ PORT_SetError(PR_NOT_IMPLEMENTED_ERROR);
-+ return SECFailure;
-+}
-+
-+PRBool
-+CERT_GetUsePKIXForValidation()
-+{
-+ return PR_FALSE;
-+}
-+
-+SECStatus CERT_PKIXVerifyCert(
-+ CERTCertificate *cert,
-+ SECCertificateUsage usages,
-+ CERTValInParam *paramsIn,
-+ CERTValOutParam *paramsOut,
-+ void *wincx)
-+{
-+ PORT_SetError(PR_NOT_IMPLEMENTED_ERROR);
-+ return SECFailure;
-+}
-+#endif /* NSS_DISABLE_LIBPKIX */
-+
- /*
- * Check the validity times of a certificate
- */
---- a/a/nss/lib/ckfw/nssck.api Tue May 28 23:37:46 2013 +0200
-+++ a/a/nss/lib/ckfw/nssck.api Fri May 31 17:44:06 2013 -0700
-@@ -1752,7 +1752,7 @@
- }
- #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */
-
--static CK_RV CK_ENTRY
-+CK_RV CK_ENTRY
- __ADJOIN(MODULE_NAME,C_GetFunctionList)
- (
- CK_FUNCTION_LIST_PTR_PTR ppFunctionList
-@@ -1830,7 +1830,7 @@
- __ADJOIN(MODULE_NAME,C_WaitForSlotEvent)
- };
-
--static CK_RV CK_ENTRY
-+CK_RV CK_ENTRY
- __ADJOIN(MODULE_NAME,C_GetFunctionList)
- (
- CK_FUNCTION_LIST_PTR_PTR ppFunctionList
-@@ -1840,6 +1840,8 @@
- return CKR_OK;
- }
-
-+#define NSS_STATIC
-+#ifndef NSS_STATIC
- /* This one is always present */
- CK_RV CK_ENTRY
- C_GetFunctionList
-@@ -1849,6 +1850,7 @@
- {
- return __ADJOIN(MODULE_NAME,C_GetFunctionList)(ppFunctionList);
- }
-+#endif
-
- #undef __ADJOIN
-
---- a/a/nss/lib/freebl/rsa.c Tue May 28 23:37:46 2013 +0200
-+++ a/a/nss/lib/freebl/rsa.c Fri May 31 17:44:06 2013 -0700
-@@ -1559,6 +1559,14 @@
- RSA_Cleanup();
- }
-
-+#define NSS_STATIC
-+#ifdef NSS_STATIC
-+void
-+BL_Unload(void)
-+{
-+}
-+#endif
-+
- PRBool bl_parentForkedAfterC_Initialize;
-
- /*
---- a/a/nss/lib/freebl/shvfy.c Tue May 28 23:37:46 2013 +0200
-+++ a/a/nss/lib/freebl/shvfy.c Fri May 31 17:44:06 2013 -0700
-@@ -273,9 +273,22 @@
- return SECSuccess;
- }
-
-+/*
-+ * Define PSEUDO_FIPS if you can't do FIPS software integrity test (e.g.,
-+ * if you're using NSS as static libraries), but want to conform to the
-+ * rest of the FIPS requirements.
-+ */
-+#define NSS_STATIC
-+#ifdef NSS_STATIC
-+#define PSEUDO_FIPS
-+#endif
-+
- PRBool
- BLAPI_SHVerify(const char *name, PRFuncPtr addr)
- {
-+#ifdef PSEUDO_FIPS
-+ return PR_TRUE; /* a lie, hence *pseudo* FIPS */
-+#else
- PRBool result = PR_FALSE; /* if anything goes wrong,
- * the signature does not verify */
- /* find our shared library name */
-@@ -291,11 +303,15 @@
- }
-
- return result;
-+#endif /* PSEUDO_FIPS */
- }
-
- PRBool
- BLAPI_SHVerifyFile(const char *shName)
- {
-+#ifdef PSEUDO_FIPS
-+ return PR_TRUE; /* a lie, hence *pseudo* FIPS */
-+#else
- char *checkName = NULL;
- PRFileDesc *checkFD = NULL;
- PRFileDesc *shFD = NULL;
-@@ -492,6 +508,7 @@
- }
-
- return result;
-+#endif /* PSEUDO_FIPS */
- }
-
- PRBool
---- a/a/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c Tue May 28 23:37:46 2013 +0200
-+++ a/a/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c Fri May 31 17:44:06 2013 -0700
-@@ -201,7 +201,11 @@
-
- typedef SECStatus (*pkix_DecodeCertsFunc)(char *certbuf, int certlen,
- CERTImportCertificateFunc f, void *arg);
--
-+#define NSS_STATIC
-+#ifdef NSS_STATIC
-+extern SECStatus CERT_DecodeCertPackage(char* certbuf, int certlen,
-+ CERTImportCertificateFunc f, void* arg);
-+#endif
-
- struct pkix_DecodeFuncStr {
- pkix_DecodeCertsFunc func; /* function pointer to the
-@@ -223,6 +226,11 @@
- */
- static PRStatus PR_CALLBACK pkix_getDecodeFunction(void)
- {
-+#ifdef NSS_STATIC
-+ pkix_decodeFunc.smimeLib = NULL;
-+ pkix_decodeFunc.func = CERT_DecodeCertPackage;
-+ return PR_SUCCESS;
-+#else
- pkix_decodeFunc.smimeLib =
- PR_LoadLibrary(SHLIB_PREFIX"smime3."SHLIB_SUFFIX);
- if (pkix_decodeFunc.smimeLib == NULL) {
-@@ -235,7 +243,7 @@
- return PR_FAILURE;
- }
- return PR_SUCCESS;
--
-+#endif
- }
-
- /*
---- a/a/nss/lib/nss/nssinit.c Tue May 28 23:37:46 2013 +0200
-+++ a/a/nss/lib/nss/nssinit.c Fri May 31 17:44:06 2013 -0700
-@@ -20,9 +20,11 @@
- #include "secerr.h"
- #include "nssbase.h"
- #include "nssutil.h"
-+#ifndef NSS_DISABLE_LIBPKIX
- #include "pkixt.h"
- #include "pkix.h"
- #include "pkix_tools.h"
-+#endif /* NSS_DISABLE_LIBPKIX */
-
- #include "pki3hack.h"
- #include "certi.h"
-@@ -530,8 +532,10 @@
- PRBool dontFinalizeModules)
- {
- SECStatus rv = SECFailure;
-+#ifndef NSS_DISABLE_LIBPKIX
- PKIX_UInt32 actualMinorVersion = 0;
- PKIX_Error *pkixError = NULL;
-+#endif
- PRBool isReallyInitted;
- char *configStrings = NULL;
- char *configName = NULL;
-@@ -685,6 +689,7 @@
- pk11sdr_Init();
- cert_CreateSubjectKeyIDHashTable();
-
-+#ifndef NSS_DISABLE_LIBPKIX
- pkixError = PKIX_Initialize
- (PKIX_FALSE, PKIX_MAJOR_VERSION, PKIX_MINOR_VERSION,
- PKIX_MINOR_VERSION, &actualMinorVersion, &plContext);
-@@ -697,6 +702,7 @@
- CERT_SetUsePKIXForValidation(PR_TRUE);
- }
- }
-+#endif /* NSS_DISABLE_LIBPKIX */
-
-
- }
-@@ -1081,7 +1087,9 @@
- cert_DestroyLocks();
- ShutdownCRLCache();
- OCSP_ShutdownGlobal();
-+#ifndef NSS_DISABLE_LIBPKIX
- PKIX_Shutdown(plContext);
-+#endif
- SECOID_Shutdown();
- status = STAN_Shutdown();
- cert_DestroySubjectKeyIDHashTable();
---- a/a/nss/lib/pk11wrap/pk11load.c Tue May 28 23:37:46 2013 +0200
-+++ a/a/nss/lib/pk11wrap/pk11load.c Fri May 31 17:44:06 2013 -0700
-@@ -318,6 +318,13 @@
- }
- }
-
-+#define NSS_STATIC
-+#ifdef NSS_STATIC
-+extern CK_RV NSC_GetFunctionList(CK_FUNCTION_LIST_PTR *pFunctionList);
-+extern CK_RV FC_GetFunctionList(CK_FUNCTION_LIST_PTR *pFunctionList);
-+extern char **NSC_ModuleDBFunc(unsigned long function,char *parameters, void *args);
-+extern CK_RV builtinsC_GetFunctionList(CK_FUNCTION_LIST_PTR *pFunctionList);
-+#else
- static const char* my_shlib_name =
- SHLIB_PREFIX"nss"SHLIB_VERSION"."SHLIB_SUFFIX;
- static const char* softoken_shlib_name =
-@@ -326,12 +332,14 @@
- static PRCallOnceType loadSoftokenOnce;
- static PRLibrary* softokenLib;
- static PRInt32 softokenLoadCount;
-+#endif /* NSS_STATIC */
-
- #include "prio.h"
- #include "prprf.h"
- #include <stdio.h>
- #include "prsystem.h"
-
-+#ifndef NSS_STATIC
- /* This function must be run only once. */
- /* determine if hybrid platform, then actually load the DSO. */
- static PRStatus
-@@ -348,6 +356,7 @@
- }
- return PR_FAILURE;
- }
-+#endif /* !NSS_STATIC */
-
- /*
- * load a new module into our address space and initialize it.
-@@ -366,6 +375,16 @@
-
- /* intenal modules get loaded from their internal list */
- if (mod->internal && (mod->dllName == NULL)) {
-+#ifdef NSS_STATIC
-+ if (mod->isFIPS) {
-+ entry = FC_GetFunctionList;
-+ } else {
-+ entry = NSC_GetFunctionList;
-+ }
-+ if (mod->isModuleDB) {
-+ mod->moduleDBFunc = NSC_ModuleDBFunc;
-+ }
-+#else
- /*
- * Loads softoken as a dynamic library,
- * even though the rest of NSS assumes this as the "internal" module.
-@@ -391,6 +410,7 @@
- mod->moduleDBFunc = (CK_C_GetFunctionList)
- PR_FindSymbol(softokenLib, "NSC_ModuleDBFunc");
- }
-+#endif
-
- if (mod->moduleDBOnly) {
- mod->loaded = PR_TRUE;
-@@ -401,6 +421,15 @@
- if (mod->dllName == NULL) {
- return SECFailure;
- }
-+#if defined(NSS_STATIC) && !defined(NSS_DISABLE_ROOT_CERTS)
-+ if (strstr(mod->dllName, "nssckbi") != NULL) {
-+ mod->library = NULL;
-+ PORT_Assert(!mod->moduleDBOnly);
-+ entry = builtinsC_GetFunctionList;
-+ PORT_Assert(!mod->isModuleDB);
-+ goto library_loaded;
-+ }
-+#endif
-
- /* load the library. If this succeeds, then we have to remember to
- * unload the library if anything goes wrong from here on out...
-@@ -423,6 +452,9 @@
- mod->moduleDBFunc = (void *)
- PR_FindSymbol(library, "NSS_ReturnModuleSpecData");
- }
-+#if defined(NSS_STATIC) && !defined(NSS_DISABLE_ROOT_CERTS)
-+library_loaded:
-+#endif
- if (mod->moduleDBFunc == NULL) mod->isModuleDB = PR_FALSE;
- if (entry == NULL) {
- if (mod->isModuleDB) {
-@@ -562,6 +594,7 @@
- * if not, we should change this to SECFailure and move it above the
- * mod->loaded = PR_FALSE; */
- if (mod->internal && (mod->dllName == NULL)) {
-+#ifndef NSS_STATIC
- if (0 == PR_ATOMIC_DECREMENT(&softokenLoadCount)) {
- if (softokenLib) {
- disableUnload = PR_GetEnv("NSS_DISABLE_UNLOAD");
-@@ -573,12 +606,18 @@
- }
- loadSoftokenOnce = pristineCallOnce;
- }
-+#endif
- return SECSuccess;
- }
-
- library = (PRLibrary *)mod->library;
- /* paranoia */
- if (library == NULL) {
-+#if defined(NSS_STATIC) && !defined(NSS_DISABLE_ROOT_CERTS)
-+ if (strstr(mod->dllName, "nssckbi") != NULL) {
-+ return SECSuccess;
-+ }
-+#endif
- return SECFailure;
- }
-
---- a/a/nss/lib/softoken/lgglue.c Tue May 28 23:37:46 2013 +0200
-+++ a/a/nss/lib/softoken/lgglue.c Fri May 31 17:44:06 2013 -0700
-@@ -23,6 +23,8 @@
- static LGAddSecmodFunc legacy_glue_addSecmod = NULL;
- static LGShutdownFunc legacy_glue_shutdown = NULL;
-
-+#define NSS_STATIC
-+#ifndef NSS_STATIC
- /*
- * The following 3 functions duplicate the work done by bl_LoadLibrary.
- * We should make bl_LoadLibrary a global and replace the call to
-@@ -160,6 +161,7 @@
-
- return lib;
- }
-+#endif /* STATIC LIBRARIES */
-
- /*
- * stub files for legacy db's to be able to encrypt and decrypt
-@@ -272,6 +274,21 @@
- return SECSuccess;
- }
-
-+#ifdef NSS_STATIC
-+#ifdef NSS_DISABLE_DBM
-+ return SECFailure;
-+#else
-+ lib = (PRLibrary *) 0x8;
-+
-+ legacy_glue_open = legacy_Open;
-+ legacy_glue_readSecmod = legacy_ReadSecmodDB;
-+ legacy_glue_releaseSecmod = legacy_ReleaseSecmodDBData;
-+ legacy_glue_deleteSecmod = legacy_DeleteSecmodDB;
-+ legacy_glue_addSecmod = legacy_AddSecmodDB;
-+ legacy_glue_shutdown = legacy_Shutdown;
-+ setCryptFunction = legacy_SetCryptFunctions;
-+#endif
-+#else
- lib = sftkdb_LoadLibrary(LEGACY_LIB_NAME);
- if (lib == NULL) {
- return SECFailure;
-@@ -297,11 +314,14 @@
- PR_UnloadLibrary(lib);
- return SECFailure;
- }
-+#endif /* NSS_STATIC */
-
- /* verify the loaded library if we are in FIPS mode */
- if (isFIPS) {
- if (!BLAPI_SHVerify(LEGACY_LIB_NAME,(PRFuncPtr)legacy_glue_open)) {
-+#ifndef NSS_STATIC
- PR_UnloadLibrary(lib);
-+#endif
- return SECFailure;
- }
- legacy_glue_libCheckSucceeded = PR_TRUE;
-@@ -418,10 +438,12 @@
- #endif
- crv = (*legacy_glue_shutdown)(parentForkedAfterC_Initialize);
- }
-+#ifndef NSS_STATIC
- disableUnload = PR_GetEnv("NSS_DISABLE_UNLOAD");
- if (!disableUnload) {
- PR_UnloadLibrary(legacy_glue_lib);
- }
-+#endif
- legacy_glue_lib = NULL;
- legacy_glue_open = NULL;
- legacy_glue_readSecmod = NULL;
---- a/a/nss/lib/softoken/lgglue.h Tue May 28 23:37:46 2013 +0200
-+++ a/a/nss/lib/softoken/lgglue.h Fri May 31 17:44:06 2013 -0700
-@@ -38,6 +38,25 @@
- typedef void (*LGSetForkStateFunc)(PRBool);
- typedef void (*LGSetCryptFunc)(LGEncryptFunc, LGDecryptFunc);
-
-+extern CK_RV legacy_Open(const char *dir, const char *certPrefix,
-+ const char *keyPrefix,
-+ int certVersion, int keyVersion, int flags,
-+ SDB **certDB, SDB **keyDB);
-+extern char ** legacy_ReadSecmodDB(const char *appName,
-+ const char *filename,
-+ const char *dbname, char *params, PRBool rw);
-+extern SECStatus legacy_ReleaseSecmodDBData(const char *appName,
-+ const char *filename,
-+ const char *dbname, char **params, PRBool rw);
-+extern SECStatus legacy_DeleteSecmodDB(const char *appName,
-+ const char *filename,
-+ const char *dbname, char *params, PRBool rw);
-+extern SECStatus legacy_AddSecmodDB(const char *appName,
-+ const char *filename,
-+ const char *dbname, char *params, PRBool rw);
-+extern SECStatus legacy_Shutdown(PRBool forked);
-+extern void legacy_SetCryptFunctions(LGEncryptFunc, LGDecryptFunc);
-+
- /*
- * Softoken Glue Functions
- */
---- a/a/nss/lib/util/secport.h Tue May 28 23:37:46 2013 +0200
-+++ a/a/nss/lib/util/secport.h Fri May 31 17:44:06 2013 -0700
-@@ -210,6 +210,8 @@
-
- extern int NSS_SecureMemcmp(const void *a, const void *b, size_t n);
-
-+#define NSS_STATIC
-+#ifndef NSS_STATIC
- /*
- * Load a shared library called "newShLibName" in the same directory as
- * a shared library that is already loaded, called existingShLibName.
-@@ -244,6 +245,7 @@
- PORT_LoadLibraryFromOrigin(const char* existingShLibName,
- PRFuncPtr staticShLibFunc,
- const char *newShLibName);
-+#endif /* NSS_STATIC */
-
- SEC_END_PROTOS
-
diff --git a/external/nss/nss-more-static.patch b/external/nss/nss-more-static.patch
deleted file mode 100644
index 26948f0be24c..000000000000
--- a/external/nss/nss-more-static.patch
+++ /dev/null
@@ -1,39 +0,0 @@
---- a/a/nss/lib/freebl/loader.c
-+++ a/a/nss/lib/freebl/loader.c
-@@ -114,6 +114,7 @@
-
- #include "genload.c"
-
-+extern FREEBLGetVectorFn FREEBL_GetVector;
- /* This function must be run only once. */
- /* determine if hybrid platform, then actually load the DSO. */
- static PRStatus
-@@ -136,9 +136,9 @@
- return PR_FAILURE;
- }
-
-- handle = loader_LoadLibrary(name);
-- if (handle) {
-- PRFuncPtr address = PR_FindFunctionSymbol(handle, "FREEBL_GetVector");
-+ handle = 0;
-+ {
-+ PRFuncPtr address = FREEBL_GetVector;
- if (address) {
- FREEBLGetVectorFn *getVector = (FREEBLGetVectorFn *)address;
- const FREEBLVector *dsoVector = getVector();
-@@ -887,6 +887,7 @@
- void
- BL_Unload(void)
- {
-+#if 0
- /* This function is not thread-safe, but doesn't need to be, because it is
- * only called from functions that are also defined as not thread-safe,
- * namely C_Finalize in softoken, and the SSL bypass shutdown callback called
-@@ -905,6 +905,7 @@
- }
- blLib = NULL;
- loadFreeBLOnce = pristineCallOnce;
-+#endif
- }
-
- /* ============== New for 3.003 =============================== */
diff --git a/external/nss/nss.patch b/external/nss/nss.patch
index 1eb0bf70d866..3f76fc52436d 100644
--- a/external/nss/nss.patch
+++ b/external/nss/nss.patch
@@ -153,16 +153,3 @@
#! gmake
#
# This Source Code Form is subject to the terms of the Mozilla Public
-@@ -89,10 +91,10 @@
- NSPR_CONFIGURE_ENV = CC=gcc CXX=g++
- endif
- ifdef CC
--NSPR_CONFIGURE_ENV = CC=$(CC)
-+NSPR_CONFIGURE_ENV = CC="$(CC) "
- endif
- ifdef CCC
--NSPR_CONFIGURE_ENV += CXX=$(CCC)
-+NSPR_CONFIGURE_ENV += CXX="$(CCC) "
- endif
- # Remove -arch definitions. NSPR can't handle that.
- NSPR_CONFIGURE_ENV := $(filter-out -arch x86_64,$(NSPR_CONFIGURE_ENV))
commit 873ff23350d08f0c0feb6a0b309ba9e53da4881f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Aug 7 12:58:01 2019 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:07 2019 +0200
expand pyuno path separators
Change-Id: Ic97649ed6d4be595b308922c7bdc880cbb60b239
Reviewed-on: https://gerrit.libreoffice.org/77102
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit 75903a0298218f89a199a5ac151ee0166f4469d7)
Reviewed-on: https://gerrit.libreoffice.org/77120
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 336a56c307e1..d9203abc5f9e 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1477,7 +1477,8 @@ bool SfxObjectShell::UnTrustedScript(const OUString& rScriptURL)
if (!sfUri.is())
return false;
- OUString sScript = sfUri->getName();
+ // pyuno encodes path separator as |
+ OUString sScript = sfUri->getName().replace('|', '/');
// check if any path portion matches LibreLogo and ban it if it does
sal_Int32 nIndex = 0;
commit bdcf30147818ce94ea0d3d68af4e812ea56fe7d2
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jul 26 13:25:31 2019 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:07 2019 +0200
decode url escape codes and check each path segment
Change-Id: Ie8f7cef912e8dacbc2a0bca73534a7a242a53ca1
Reviewed-on: https://gerrit.libreoffice.org/76378
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Tested-by: Jenkins
(cherry picked from commit 7942929685fafb0f9c82feb8da7279e5103c87f0)
Reviewed-on: https://gerrit.libreoffice.org/76453
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index b3e7e510fdeb..336a56c307e1 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -54,6 +54,8 @@
#include <com/sun/star/script/provider/XScriptProvider.hpp>
#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
+#include <com/sun/star/uri/UriReferenceFactory.hpp>
+#include <com/sun/star/uri/XVndSunStarScriptUrlReference.hpp>
#include <com/sun/star/util/XModifiable.hpp>
#include <toolkit/helper/vclunohelper.hxx>
@@ -1464,7 +1466,32 @@ namespace
// don't allow LibreLogo to be used with our mouseover/etc dom-alike events
bool SfxObjectShell::UnTrustedScript(const OUString& rScriptURL)
{
- return rScriptURL.startsWithIgnoreAsciiCase("vnd.sun.star.script:LibreLogo");
+ if (!rScriptURL.startsWith("vnd.sun.star.script:"))
+ return false;
+
+ // ensure URL Escape Codes are decoded
+ css::uno::Reference<css::uri::XUriReference> uri(
+ css::uri::UriReferenceFactory::create(comphelper::getProcessComponentContext())->parse(rScriptURL));
+ css::uno::Reference<css::uri::XVndSunStarScriptUrl> sfUri(uri, css::uno::UNO_QUERY);
+
+ if (!sfUri.is())
+ return false;
+
+ OUString sScript = sfUri->getName();
+
+ // check if any path portion matches LibreLogo and ban it if it does
+ sal_Int32 nIndex = 0;
+ do
+ {
+ OUString aToken = sScript.getToken(0, '/', nIndex);
+ if (aToken.startsWithIgnoreAsciiCase("LibreLogo"))
+ {
+ return true;
+ }
+ }
+ while (nIndex >= 0);
+
+ return false;
}
ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptContext, const OUString& _rScriptURL,
commit 219b9618c5df2efdeea63fe1f07433bedc345d01
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Aug 1 10:52:12 2019 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:07 2019 +0200
tdf#126641: don't fail on file URLs with fragment
This only fixes part that the URL refuses to open the target file.
Honoring fragment isn't fixed here, since it's the system call to
ShellExecuteExW that in this case internally converts the file URL
into a system path, and strips the fragment from it.
Regression from commit d59ec4cd1660410fa1b18c50d2d83b1417a82ddc.
Change-Id: I6c9ed27e9a5bd7f2780dd3be96f816a6e825e043
Reviewed-on: https://gerrit.libreoffice.org/76778
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
(cherry picked from commit 2207269a84c7c9920af3385b837ce67978c720b4)
Reviewed-on: https://gerrit.libreoffice.org/76848
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit dd2b7919058fc0e23a7117d39110d3ecaaad1fb2)
Reviewed-on: https://gerrit.libreoffice.org/76881
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit 72861eaf7cf9af3e7764b13d9e74edc5548806d2)
Reviewed-on: https://gerrit.libreoffice.org/77095
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index 44a6e047bdc6..88364ab3dc21 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -304,7 +304,9 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
}
if (uri->getScheme().equalsIgnoreAsciiCase("file")) {
OUString pathname;
- auto const e1 = osl::FileBase::getSystemPathFromFileURL(aCommand, pathname);
+ uri->clearFragment(); // getSystemPathFromFileURL fails for URLs with fragment
+ auto const e1
+ = osl::FileBase::getSystemPathFromFileURL(uri->getUriReference(), pathname);
if (e1 != osl::FileBase::E_None) {
throw css::lang::IllegalArgumentException(
("XSystemShellExecute.execute, getSystemPathFromFileURL <" + aCommand
commit 564ac136d358d4833b9a733865deafe1c7366b84
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sat Aug 3 16:37:48 2019 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:07 2019 +0200
keep name percent-encoded
Change-Id: I470c4b24192c3e3c9b556a9bbb3b084359e0033b
Reviewed-on: https://gerrit.libreoffice.org/77006
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 315c51731384230194af26b86a976bf5d06c9dcc)
Reviewed-on: https://gerrit.libreoffice.org/77096
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index 9609b6d94640..6625b226f609 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -218,7 +218,9 @@ class MyUriHelper:
# path to the .py file + "$functionname, arguments, etc
xStorageUri = self.m_uriRefFac.parse(scriptURI)
- sStorageUri = xStorageUri.getName().replace( "|", "/" );
+ # getName will apply url-decoding to the name, so encode back
+ sStorageUri = xStorageUri.getName().replace("%", "%25")
+ sStorageUri = sStorageUri.replace( "|", "/" )
# path to the .py file, relative to the base
sFileUri = sStorageUri[0:sStorageUri.find("$")]
commit ae8a99f2f10c4b2c38026bb792411d6159a4c75b
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Aug 6 13:29:22 2019 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:07 2019 +0200
Properly obtain location
Change-Id: I9fb0d883a3623394343cd54ef61e5610544198c8
Reviewed-on: https://gerrit.libreoffice.org/77019
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit a9cde2557242a0c343d99533f3ee032599c66f42)
Reviewed-on: https://gerrit.libreoffice.org/77023
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 28c6af3ddc283ca9c5712359a9abcb385c1575b4)
Reviewed-on: https://gerrit.libreoffice.org/77097
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx
index 85573b51a5c3..e75897ef5894 100644
--- a/scripting/source/protocolhandler/scripthandler.cxx
+++ b/scripting/source/protocolhandler/scripthandler.cxx
@@ -51,6 +51,7 @@
#include "com/sun/star/uri/XUriReference.hpp"
#include "com/sun/star/uri/UriReferenceFactory.hpp"
#include "com/sun/star/uri/XVndSunStarScriptUrl.hpp"
+#include <com/sun/star/uri/XVndSunStarScriptUrlReference.hpp>
#include <memory>
@@ -146,8 +147,12 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
{
try
{
- bool bIsDocumentScript = ( aURL.Complete.indexOf( "document" ) !=-1 );
- // TODO: isn't this somewhat strange? This should be a test for a location=document parameter, shouldn't it?
+ css::uno::Reference<css::uri::XUriReferenceFactory> urifac(
+ css::uri::UriReferenceFactory::create(m_xContext));
+ css::uno::Reference<css::uri::XVndSunStarScriptUrlReference> uri(
+ urifac->parse(aURL.Complete), css::uno::UNO_QUERY_THROW);
+ auto const loc = uri->getParameter("location");
+ bool bIsDocumentScript = loc == "document";
if ( bIsDocumentScript )
{
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 330c475efb8b..b3e7e510fdeb 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1473,19 +1473,22 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon
OSL_TRACE( "in CallXScript" );
ErrCode nErr = ERRCODE_NONE;
- bool bIsDocumentScript = ( _rScriptURL.indexOf( "location=document" ) >= 0 );
- // TODO: we should parse the URL, and check whether there is a parameter with this name.
- // Otherwise, we might find too much.
- if ( bIsDocumentScript && !lcl_isScriptAccessAllowed_nothrow( _rxScriptContext ) )
- return ERRCODE_IO_ACCESSDENIED;
-
- if ( UnTrustedScript(_rScriptURL) )
- return ERRCODE_IO_ACCESSDENIED;
-
bool bCaughtException = false;
Any aException;
try
{
+ css::uno::Reference<css::uri::XUriReferenceFactory> urifac(
+ css::uri::UriReferenceFactory::create(comphelper::getProcessComponentContext()));
+ css::uno::Reference<css::uri::XVndSunStarScriptUrlReference> uri(
+ urifac->parse(_rScriptURL), css::uno::UNO_QUERY_THROW);
+ auto const loc = uri->getParameter("location");
+ bool bIsDocumentScript = loc == "document";
+ if ( bIsDocumentScript && !lcl_isScriptAccessAllowed_nothrow( _rxScriptContext ) )
+ return ERRCODE_IO_ACCESSDENIED;
+
+ if ( UnTrustedScript(_rScriptURL) )
+ return ERRCODE_IO_ACCESSDENIED;
+
// obtain/create a script provider
Reference< provider::XScriptProvider > xScriptProvider;
Reference< provider::XScriptProviderSupplier > xSPS( _rxScriptContext, UNO_QUERY );
commit 90405c63068d57c19524b5684f6a9c73b8427732
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jul 23 15:31:05 2019 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:07 2019 +0200
expand LibreLogo check to global events
Reviewed-on: https://gerrit.libreoffice.org/76189
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 4a66c7eda6ccde26a42c4e31725248c59940255d)
Change-Id: I7f436983ba0eb4b76b02d08ee52626e54b103d5f
(cherry picked from commit e5702eefdfe6d44a92fdfb3c6a3ff47fec83ee49)
Reviewed-on: https://gerrit.libreoffice.org/76452
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 24b1d82862f9..83b5eb654618 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -409,6 +409,8 @@ public:
*/
bool AdjustMacroMode();
+ static bool UnTrustedScript(const OUString& rScriptURL);
+
SvKeyValueIterator* GetHeaderAttributes();
void ClearHeaderAttributesForSourceViewHack();
void SetHeaderAttributesForSourceViewHack();
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 3016315cd17b..330c475efb8b 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1461,16 +1461,12 @@ namespace
}
}
-namespace {
-
// don't allow LibreLogo to be used with our mouseover/etc dom-alike events
-bool UnTrustedScript(const OUString& rScriptURL)
+bool SfxObjectShell::UnTrustedScript(const OUString& rScriptURL)
{
return rScriptURL.startsWithIgnoreAsciiCase("vnd.sun.star.script:LibreLogo");
}
-}
-
ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptContext, const OUString& _rScriptURL,
const Sequence< Any >& aParams, Any& aRet, Sequence< sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam, bool bRaiseError, const css::uno::Any* pCaller )
{
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index a2796becd1f8..63d9cb909345 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -213,18 +213,24 @@ void SfxEvents_Impl::Execute( uno::Any& aEventData, const document::DocumentEven
else if (aType == "Service" ||
aType == "Script")
{
- if ( !aScript.isEmpty() )
+ bool bAllowed = false;
+ util::URL aURL;
+ if (!aScript.isEmpty())
{
- SfxViewFrame* pView = pDoc ?
- SfxViewFrame::GetFirst( pDoc ) :
- SfxViewFrame::Current();
-
uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
- util::URL aURL;
aURL.Complete = aScript;
xTrans->parseStrict( aURL );
+ bAllowed = !SfxObjectShell::UnTrustedScript(aURL.Complete);
+ }
+
+ if (bAllowed)
+ {
+ SfxViewFrame* pView = pDoc ?
+ SfxViewFrame::GetFirst( pDoc ) :
+ SfxViewFrame::Current();
+
uno::Reference
< frame::XDispatchProvider > xProv;
commit 34e4fc81fe47f60a7c23a823546e5bf13efeaa1c
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Jul 29 12:28:26 2019 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:07 2019 +0200
remove LibreLogo from build
Conflicts:
scp2/AutoInstall.mk
setup_native/source/packinfo/packinfo_office.txt
sw/Module_sw.mk
Change-Id: I62b45ea4890f5693e7d12f2b8c4ae43a9a03d16e
diff --git a/Repository.mk b/Repository.mk
index 01ab27e12115..de328943a601 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -893,10 +893,6 @@ $(eval $(call gb_Helper_register_packages_for_install,python_scriptprovider, \
scriptproviderforpython \
))
-$(eval $(call gb_Helper_register_packages_for_install,python_librelogo, \
- librelogo \
- librelogo_properties \
-))
endif # DISABLE_PYTHON
# External executables
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index d2f1d849b7fa..da121a6ddbbe 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -75,7 +75,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
jurt \
jvmaccess \
jvmfwk \
- librelogo \
libreofficekit \
lingucomponent \
linguistic \
diff --git a/bin/distro-install-file-lists b/bin/distro-install-file-lists
index 2960f5fe0410..0bb77170d16b 100755
--- a/bin/distro-install-file-lists
+++ b/bin/distro-install-file-lists
@@ -142,14 +142,12 @@ if test "z$OOO_VENDOR" != "zDebian" ; then
merge_flists gid_Module_Optional_Pymailmerge $FILELISTSDIR/pyuno_list.txt
merge_flists gid_Module_Pyuno $FILELISTSDIR/pyuno_list.txt
merge_flists gid_Module_Script_Provider_For_Python $FILELISTSDIR/pyuno_list.txt
- merge_flists gid_Module_Optional_Pyuno_LibreLogo $FILELISTSDIR/pyuno_list.txt
merge_flists gid_Module_Optional_Xsltfiltersamples $FILELISTSDIR/common_list.txt
else
merge_flists gid_Module_Optional_Grfflt $FILELISTSDIR/common_list.txt
merge_flists gid_Module_Optional_Headless $FILELISTSDIR/common_list.txt
merge_flists gid_Module_Optional_Pymailmerge $FILELISTSDIR/mailmerge_list.txt
merge_flists gid_Module_Pyuno $FILELISTSDIR/pyuno_list.txt
- merge_flists gid_Module_Optional_Pyuno_LibreLogo $FILELISTSDIR/pyuno_list.txt
merge_flists gid_Module_Script_Provider_For_Python $FILELISTSDIR/pyuno_list.txt
merge_flists gid_Module_Optional_Xsltfiltersamples $FILELISTSDIR/filters_list.txt
fi
@@ -158,7 +156,6 @@ if test "z$OOO_VENDOR" != "zDebian" ; then
merge_flists gid_Module_Optional_Headless $FILELISTSDIR/common_list.txt
merge_flists gid_Module_Optional_Pymailmerge $FILELISTSDIR/common_list.txt
merge_flists gid_Module_Pyuno $FILELISTSDIR/common_list.txt
- merge_flists gid_Module_Optional_Pyuno_LibreLogo $FILELISTSDIR/common_list.txt
merge_flists gid_Module_Script_Provider_For_Python $FILELISTSDIR/common_list.txt
merge_flists gid_Module_Optional_Xsltfiltersamples $FILELISTSDIR/common_list.txt
fi
diff --git a/officecfg/Configuration_officecfg.mk b/officecfg/Configuration_officecfg.mk
index 1768f4e425a8..adf801fa6f64 100644
--- a/officecfg/Configuration_officecfg.mk
+++ b/officecfg/Configuration_officecfg.mk
@@ -73,7 +73,6 @@ $(eval $(call gb_Configuration_add_spool_modules,registry,officecfg/registry/dat
org/openoffice/Office/Accelerators-macosx.xcu \
org/openoffice/Office/Accelerators-reportbuilder.xcu \
org/openoffice/Office/Accelerators-unxwnt.xcu \
- org/openoffice/Office/Addons-librelogo.xcu \
org/openoffice/Office/Common-writer.xcu \
org/openoffice/Office/Common-calc.xcu \
org/openoffice/Office/Common-draw.xcu \
@@ -109,7 +108,6 @@ $(eval $(call gb_Configuration_add_spool_modules,registry,officecfg/registry/dat
org/openoffice/Office/Embedding-base.xcu \
org/openoffice/Office/Embedding-reportbuilder.xcu \
org/openoffice/Office/Embedding-writer.xcu \
- org/openoffice/Office/UI/WriterWindowState-librelogo.xcu \
org/openoffice/Office/UI/Controller-reportbuilder.xcu \
org/openoffice/TypeDetection/UISort-writer.xcu \
org/openoffice/TypeDetection/UISort-calc.xcu \
@@ -129,7 +127,6 @@ $(eval $(call gb_Configuration_add_spool_langpack,registry,officecfg/registry/da
$(eval $(call gb_Configuration_add_localized_datas,registry,officecfg/registry/data,\
org/openoffice/Setup.xcu \
org/openoffice/Office/Accelerators.xcu \
- org/openoffice/Office/Addons.xcu \
org/openoffice/Office/Common.xcu \
org/openoffice/Office/DataAccess.xcu \
org/openoffice/Office/PresentationMinimizer.xcu \
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
index 57a59d2e12c7..803cae4abbf2 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
@@ -831,20 +831,6 @@
<value>true</value>
</prop>
</node>
- <node oor:name="private:resource/toolbar/addon_LibreLogo.OfficeToolBar" oor:op="replace" install:module="librelogo">
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Logo</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Locked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- </node>
<node oor:name="private:resource/toolbar/changes" oor:op="replace">
<prop oor:name="DockPos" oor:type="xs:string">
<value>1,2</value>
diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk
index 6a9e2d19e457..119bd08befd9 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -27,7 +27,6 @@ postprocess_XCDS := \
draw.xcd \
graphicfilter.xcd \
impress.xcd \
- librelogo.xcd \
lingucomponent.xcd \
main.xcd \
math.xcd \
@@ -110,11 +109,6 @@ postprocess_FILES_impress := \
$(postprocess_MOD)/org/openoffice/Office/ProtocolHandler-impress.xcu \
$(postprocess_MOD)/org/openoffice/Setup-impress.xcu
-postprocess_DEPS_librelogo := main writer
-postprocess_FILES_librelogo := \
- $(postprocess_MOD)/org/openoffice/Office/Addons-librelogo.xcu \
- $(postprocess_MOD)/org/openoffice/Office/UI/WriterWindowState-librelogo.xcu
-
postprocess_DEPS_lingucomponent := main
postprocess_FILES_lingucomponent := \
$(SRCDIR)/lingucomponent/config/Linguistic-lingucomponent-hyphenator.xcu \
diff --git a/scp2/AutoInstall.mk b/scp2/AutoInstall.mk
index 3f6de8c6f8da..0aea89f48b00 100644
--- a/scp2/AutoInstall.mk
+++ b/scp2/AutoInstall.mk
@@ -36,7 +36,6 @@ $(eval $(call gb_AutoInstall_add_module,ooo,LIBO_LIB_FILE,LIBO_EXECUTABLE,LIBO_J
$(eval $(call gb_AutoInstall_add_module,ooobinarytable,LIBO_LIB_FILE_BINARYTABLE))
$(eval $(call gb_AutoInstall_add_module,python,LIBO_LIB_FILE,LIBO_EXECUTABLE))
$(eval $(call gb_AutoInstall_add_module,python_scriptprovider,))
-$(eval $(call gb_AutoInstall_add_module,python_librelogo,))
$(eval $(call gb_AutoInstall_add_module,postgresqlsdbc,LIBO_LIB_FILE))
$(eval $(call gb_AutoInstall_add_module,pdfimport,LIBO_LIB_FILE,LIBO_EXECUTABLE))
$(eval $(call gb_AutoInstall_add_module,quickstart,,LIBO_EXECUTABLE))
diff --git a/scp2/InstallModule_python.mk b/scp2/InstallModule_python.mk
index 965781cc771e..c879713bd600 100644
--- a/scp2/InstallModule_python.mk
+++ b/scp2/InstallModule_python.mk
@@ -12,7 +12,6 @@ $(eval $(call gb_InstallModule_InstallModule,scp2/python))
$(eval $(call gb_InstallModule_use_auto_install_libs,scp2/python,\
python \
python_scriptprovider \
- python_librelogo \
))
ifeq ($(DISABLE_PYTHON),TRUE)
@@ -45,12 +44,7 @@ endif
$(eval $(call gb_InstallModule_add_scpfiles,scp2/python,\
scp2/source/python/file_python \
- scp2/source/python/file_python_librelogo \
scp2/source/python/module_python \
))
-$(eval $(call gb_InstallModule_add_localized_scpfiles,scp2/python,\
- scp2/source/python/module_python_librelogo \
-))
-
# vim: set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/setup_native/source/packinfo/packinfo_office.txt b/setup_native/source/packinfo/packinfo_office.txt
index 8c1eaf187796..c423661bd2d5 100644
--- a/setup_native/source/packinfo/packinfo_office.txt
+++ b/setup_native/source/packinfo/packinfo_office.txt
@@ -266,6 +266,8 @@ module = "gid_Module_Pyuno"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-pyuno"
solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core, SUNWPython"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-pyuno"
+linuxreplaces = "%BASISPACKAGEPREFIX%PRODUCTVERSION-librelogo"
+linuxincompat = "%BASISPACKAGEPREFIX%PRODUCTVERSION-librelogo"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
copyright = "2017 The Document Foundation"
@@ -277,21 +279,6 @@ packageversion = "%PACKAGEVERSION"
End
Start
-module = "gid_Module_Optional_Pyuno_LibreLogo"
-solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-librelogo"
-solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-pyuno,%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-writer,SUNWPython"
-packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-librelogo"
-freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-pyuno,%BASISPACKAGEPREFIX%PRODUCTVERSION-writer"
-requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-pyuno %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-writer %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2017 The Document Foundation"
-solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
-description = "LibreLogo toolbar for %PRODUCTNAME %PRODUCTVERSION Writer"
-destpath = "/opt"
-packageversion = "%PACKAGEVERSION"
-End
-
-Start
module = "gid_Module_Script_Provider_For_Python"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-python-script-provider"
solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core (Name="Core module for %PRODUCTNAME %PRODUCTVERSION")"
commit 68261f1a2413239649b480861c3c7e43002d566d
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Jun 7 09:28:12 2019 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:07 2019 +0200
More uses of referer URL with SvxBrushItem
Reviewed-on: https://gerrit.libreoffice.org/73643
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit b518882de8213ef71a8003f95fbdf7689069c06d)
Conflicts:
sw/source/core/text/porfld.cxx
sw/source/core/unocore/unosett.cxx
Reviewed-on: https://gerrit.libreoffice.org/73860
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
(cherry picked from commit 87c418a98650ab6e4a62a0b4b72e02fee358dced)
Change-Id: I04b524784df4ef453d8b1feec13b62f183a17e23
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
index dff4f1f8aee0..0aa6daefce36 100644
--- a/sw/inc/unosett.hxx
+++ b/sw/inc/unosett.hxx
@@ -208,7 +208,7 @@ public:
static css::uno::Sequence<css::beans::PropertyValue> GetPropertiesForNumFormat(
const SwNumFormat& rFormat, OUString const& rCharFormatName,
- OUString const* pHeadingStyleName);
+ OUString const* pHeadingStyleName, OUString const & referer);
static void SetPropertiesToNumFormat(
SwNumFormat & aFormat,
OUString & rCharStyleName,
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 8c489de68590..c3de3a25128e 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -756,7 +756,7 @@ SwBulletPortion::SwBulletPortion( const sal_Unicode cBullet,
SwGrfNumPortion::SwGrfNumPortion(
SwFrame*,
const OUString& rGraphicFollowedBy,
- const SvxBrushItem* pGrfBrush,
+ const SvxBrushItem* pGrfBrush, OUString const & referer,
const SwFormatVertOrient* pGrfOrient, const Size& rGrfSize,
const bool bLft, const bool bCntr, const sal_uInt16 nMinDst,
const bool bLabelAlignmentPosAndSpaceModeActive ) :
@@ -770,7 +770,7 @@ SwGrfNumPortion::SwGrfNumPortion(
if( pGrfBrush )
{
*pBrush = *pGrfBrush;
- const Graphic* pGraph = pGrfBrush->GetGraphic();
+ const Graphic* pGraph = pGrfBrush->GetGraphic(referer);
if( pGraph )
SetAnimated( pGraph->IsAnimated() );
else
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index cc5e350dbefa..a4f94d5147a1 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -172,6 +172,7 @@ public:
SwGrfNumPortion( SwFrame *pFrame,
const OUString& rGraphicFollowedBy,
const SvxBrushItem* pGrfBrush,
+ OUString const & referer,
const SwFormatVertOrient* pGrfOrient,
const Size& rGrfSize,
const bool bLeft,
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index d024e556ea43..26725e1cba3a 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -52,6 +52,7 @@
#include "flddat.hxx"
#include "fmtautofmt.hxx"
#include <IDocumentSettingAccess.hxx>
+#include <sfx2/docfile.hxx>
#include <svl/itemiter.hxx>
static bool lcl_IsInBody( SwFrame *pFrame )
@@ -478,9 +479,18 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con
if( SVX_NUM_BITMAP == rNumFormat.GetNumberingType() )
{
+ OUString referer;
+ if (auto const sh1 = rInf.GetVsh()) {
+ if (auto const doc = sh1->GetDoc()) {
+ auto const sh2 = doc->GetPersist();
+ if (sh2 != nullptr && sh2->HasName()) {
+ referer = sh2->GetMedium()->GetName();
+ }
+ }
+ }
pRet = new SwGrfNumPortion( const_cast<SwTextFrame*>(GetTextFrame()),
pTextNd->GetLabelFollowedBy(),
- rNumFormat.GetBrush(),
+ rNumFormat.GetBrush(), referer,
rNumFormat.GetGraphicOrientation(),
rNumFormat.GetGraphicSize(),
bLeft, bCenter, nMinDist,
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 81fd65d30a05..afbee31d0340 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -54,6 +54,7 @@
#include <vcl/font.hxx>
#include <editeng/flstitem.hxx>
#include <vcl/metric.hxx>
+#include <sfx2/docfile.hxx>
#include <svtools/ctrltool.hxx>
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
@@ -1341,13 +1342,21 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
SwStyleNameMapper::FillProgName(sValue, aUString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true);
}
- return GetPropertiesForNumFormat(rFormat, CharStyleName, (pDocShell) ? & aUString : nullptr);
+ OUString referer;
+ if (pDoc != nullptr) {
+ auto const sh = pDoc->GetPersist();
+ if (sh != nullptr && sh->HasName()) {
+ referer = sh->GetMedium()->GetName();
+ }
+ }
+ return GetPropertiesForNumFormat(
+ rFormat, CharStyleName, (pDocShell) ? & aUString : nullptr, referer);
}
uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFormat(
const SwNumFormat& rFormat, OUString const& rCharFormatName,
- OUString const*const pHeadingStyleName)
+ OUString const*const pHeadingStyleName, OUString const & referer)
{
bool bChapterNum = pHeadingStyleName != nullptr;
@@ -1479,7 +1488,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFormat
//graphicbitmap
const Graphic* pGraphic = nullptr;
if(pBrush )
- pGraphic = pBrush->GetGraphic();
+ pGraphic = pBrush->GetGraphic(referer);
if(pGraphic)
{
uno::Reference<awt::XBitmap> xBmp = VCLUnoHelper::CreateBitmap( pGraphic->GetBitmapEx() );
diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx
index 75b49a22a085..793c13719c5f 100644
--- a/sw/source/uibase/config/StoredChapterNumbering.cxx
+++ b/sw/source/uibase/config/StoredChapterNumbering.cxx
@@ -135,7 +135,7 @@ public:
OUString dummy; // pass in empty HeadingStyleName - can't import anyway
uno::Sequence<beans::PropertyValue> const ret(
SwXNumberingRules::GetPropertiesForNumFormat(
- *pNumFormat, *pCharStyleName, &dummy));
+ *pNumFormat, *pCharStyleName, &dummy, ""));
return uno::makeAny(ret);
}
commit d5b80db9d9cf6c4ee91dbd6f37dcad89410c2a05
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jun 7 14:04:07 2019 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:06 2019 +0200
explictly exclude LibreLogo from XScript usage
Change-Id: I567647f0e2f8b82e4ef2995c673abe82f4564228
Reviewed-on: https://gerrit.libreoffice.org/73659
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit cb0024e3668979dfdef44db5aa15ddfaf035e695)
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 902e96ccea05..3016315cd17b 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1461,6 +1461,16 @@ namespace
}
}
+namespace {
+
+// don't allow LibreLogo to be used with our mouseover/etc dom-alike events
+bool UnTrustedScript(const OUString& rScriptURL)
+{
+ return rScriptURL.startsWithIgnoreAsciiCase("vnd.sun.star.script:LibreLogo");
+}
+
+}
+
ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptContext, const OUString& _rScriptURL,
const Sequence< Any >& aParams, Any& aRet, Sequence< sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam, bool bRaiseError, const css::uno::Any* pCaller )
{
@@ -1473,6 +1483,9 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon
if ( bIsDocumentScript && !lcl_isScriptAccessAllowed_nothrow( _rxScriptContext ) )
return ERRCODE_IO_ACCESSDENIED;
+ if ( UnTrustedScript(_rScriptURL) )
+ return ERRCODE_IO_ACCESSDENIED;
+
bool bCaughtException = false;
Any aException;
try
commit 7c3c9c2a812d2f249c67613cb3e0463aacc875af
Author: László Németh <nemeth at numbertext.org>
AuthorDate: Thu Jun 6 14:25:32 2019 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:06 2019 +0200
sanitize LibreLogo calls
Change-Id: Ie4d9858e5b4b3e55ab08416fb9338d2df34ee5e1
Reviewed-on: https://gerrit.libreoffice.org/73627
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth at numbertext.org>
(cherry picked from commit 1b63fa32bbd4a5b89d2ee3a53b28de4250c8dad3)
diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py
index 7885ab9bb66d..2b9ef849ad13 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -76,6 +76,7 @@ __LineStyle_DOTTED__ = 2
class __Doc__:
def __init__(self, doc):
self.doc = doc
+ self.secure = False
try:
self.drawpage = doc.DrawPage # Writer
except:
@@ -409,10 +410,58 @@ class LogoProgram(threading.Thread):
self.code = code
threading.Thread.__init__(self)
+ def secure(self):
+ # 0 = secure
+ if _.secure:
+ return 0
+
+ # 1 = forms, fields or embedded objects are forbidden
+ if _.doc.DrawPage.Forms.getCount() > 0 or _.doc.getTextFields().createEnumeration().hasMoreElements() or _.doc.getEmbeddedObjects().getCount() > 0:
+ return 1
+
+ # 2 = hyperlinks with script events
+ nodes = _.doc.Text.createEnumeration()
+ while nodes.hasMoreElements():
+ node = nodes.nextElement()
+ if node.supportsService("com.sun.star.text.Paragraph"):
+ portions = node.createEnumeration()
+ while portions.hasMoreElements():
+ portion = portions.nextElement()
+ if portion.PropertySetInfo.hasPropertyByName("HyperLinkEvents"):
+ events = portion.getPropertyValue("HyperLinkEvents")
+ for event in events.getElementNames():
+ attributes = events.getByName(event)
+ for attribute in attributes:
+ if attribute.Name == "EventType" and attribute.Value == "Script":
+ return 2
+
+ # 2 = images with script events
+ images = _.doc.DrawPage.createEnumeration()
+ while images.hasMoreElements():
+ image = images.nextElement()
+ try:
+ events = image.Events
+ for event in events.getElementNames():
+ attributes = events.getByName(event)
+ for attribute in attributes:
+ if attribute.Name == "EventType" and attribute.Value == "Script":
+ return 2
+ except:
+ pass
+
+ _.secure = True
+ return 0
+
def run(self):
global __thread__
try:
- exec(self.code)
+ # check document security
+ secid = self.secure()
+ if secid > 0:
+ parent = _.doc.CurrentController.Frame.ContainerWindow
+ MessageBox(parent, "Document objects with%s script events" % [" possible", ""][secid-1], "LibreLogo program can't start", "errorbox")
+ else:
+ exec(self.code)
if _.origcursor[0] and _.origcursor[1]:
__dispatcher__(".uno:Escape")
try:
commit aa34604491b996c4c5a4c636d3bb946602bd42a1
Author: Michael Stahl <mstahl at redhat.com>
AuthorDate: Thu Mar 9 18:42:09 2017 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:06 2019 +0200
oops, forgot to commit that
Change-Id: I7b0a08ca47996f80112f68daef3e2ba5e3be221b
(cherry picked from commit 15d46079a5b6429dba0d501e7db218188294587a)
diff --git a/extensions/Library_so_activex_x64.mk b/extensions/Library_so_activex_x64.mk
index e1c4b9a8f9ba..64f644098a8f 100644
--- a/extensions/Library_so_activex_x64.mk
+++ b/extensions/Library_so_activex_x64.mk
@@ -52,7 +52,7 @@ $(eval $(call gb_Library_use_system_win32_libs,so_activex_x64,\
$(eval $(call gb_Library_add_libs,so_activex_x64,\
$(if $(filter 140,$(VCVER)),\
$(ATL_LIB)/amd64/atls.lib, \
- $(subst /x86,/x64,$(ATL_LIB)/amd64/atls.lib)) \
+ $(subst /x86,/x64,$(ATL_LIB)/atls.lib)) \
))
# vim:set noet sw=4 ts=4:
commit 68c9c100a3e4d94510749afcd55767b19667618d
Author: Michael Stahl <mstahl at redhat.com>
AuthorDate: Thu Mar 9 18:40:40 2017 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:06 2019 +0200
extensions: fix MSVC 2017 build of Library_so_activex_x64
Change-Id: Ia98c2ba085d6b7705b53dafd5368d69f0e0727c5
(cherry picked from commit 869a249cebaf58d13812194297561fc361dd3a36)
diff --git a/extensions/Library_so_activex_x64.mk b/extensions/Library_so_activex_x64.mk
index d330ca8a3bf0..e1c4b9a8f9ba 100644
--- a/extensions/Library_so_activex_x64.mk
+++ b/extensions/Library_so_activex_x64.mk
@@ -50,7 +50,9 @@ $(eval $(call gb_Library_use_system_win32_libs,so_activex_x64,\
))
$(eval $(call gb_Library_add_libs,so_activex_x64,\
- $(ATL_LIB)/amd64/atls.lib \
+ $(if $(filter 140,$(VCVER)),\
+ $(ATL_LIB)/amd64/atls.lib, \
+ $(subst /x86,/x64,$(ATL_LIB)/amd64/atls.lib)) \
))
# vim:set noet sw=4 ts=4:
commit 99480ffb41c5c0a19c35b660b6f53702b7dd3629
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
AuthorDate: Sat May 25 11:12:18 2019 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:06 2019 +0200
Disable warning C4005 for Vista-compatible SDK 7.1A builds
No point in pulling in all warning fixes from 5.4
Change-Id: I926b2b41628d7059ec9187918ac9df9c1160dfe6
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index ab6f27f6794e..91d2cdc4f218 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -152,6 +152,7 @@ gb_CFLAGS := \
-nologo \
-W4 \
-wd4091 \
+ -wd4005 \
$(if $(filter 0,$(gb_DEBUGLEVEL)),-wd4100) \
-wd4127 \
$(if $(filter 0,$(gb_DEBUGLEVEL)),-wd4189) \
@@ -194,6 +195,7 @@ gb_CXXFLAGS := \
-nologo \
-W4 \
-wd4091 \
+ -wd4005 \
$(if $(filter 0,$(gb_DEBUGLEVEL)),-wd4100) \
-wd4127 \
$(if $(filter 0,$(gb_DEBUGLEVEL)),-wd4189) \
@@ -259,7 +261,6 @@ gb_PCHWARNINGS = \
-we4651 \
-we4652 \
-we4653 \
- -we4005 \
gb_STDLIBS := \
advapi32.lib \
commit f115a6a73e67e5a2c0e736f6e3d460b95785131b
Author: Michael Stahl <mstahl at redhat.com>
AuthorDate: Tue May 30 17:00:42 2017 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:06 2019 +0200
gbuild: stop defining _USING_V110_SDK71_
Change-Id: Ic8eee967269b3666b15795f20ee62817dadfb0ff
(cherry picked from commit 713ed7b338b467b176af7eb5e9a80559b8496e8e)
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index cc73510bb451..ab6f27f6794e 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -54,7 +54,6 @@ gb_COMPILERDEFS := \
-D_MT \
-D_DLL \
-DCPPU_ENV=$(gb_CPPU_ENV) \
- $(if $(findstring 140_70,$(VCVER)_$(WINDOWS_SDK_VERSION)),-D_USING_V110_SDK71_) \
ifeq ($(CPUNAME),INTEL)
gb_COMPILERDEFS += \
commit d9c81309ea5441fd02ec3ad9c6a524dba9fd6b3d
Author: Michael Stahl <mstahl at redhat.com>
AuthorDate: Tue May 30 16:37:56 2017 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:06 2019 +0200
gbuild: define _WIN32_WINNT = _WIN32_WINNT_WIN7 = 0x0601
And rely on implicitly derived
_WIN32_IE = _WIN32_IE_WIN7 = _WIN32_IE_IE80
Change-Id: I94717e2ed66387bdc76f9047c02c0820d4adc1f9
(cherry picked from commit 2829dabaf37e6d9c736430f3fb9bbfb786b078ad)
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index ebd2a3c86a94..65a4f982320a 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -24,13 +24,11 @@ gb_Helper_LIBRARY_PATH_VAR := PATH
gb_MKTEMP := mktemp --tmpdir=$(gb_TMPDIR) gbuild.XXXXXX
# define _WIN32_WINNT and WINVER will be derived from it in sdkddkver.h
-# with a 7.1 SDK target Windows XP, with 8.x SDK target Windows Vista
-# currently _WIN32_IE is defined to a higher version than would be derived
-# in sdkddkver.h from _WIN32_WINNT=0x0502 but if _WIN32_WINNT >= 0x0600
-# the derived value is sufficient
+# current baseline is Windows 7 (NT 6.1)
+# for _WIN32_IE, if _WIN32_WINNT >= 0x0600 the derived value from
+# sdkddkver.h is sufficient
gb_OSDEFS := \
- -D_WIN32_WINNT=$(if $(filter 70,$(WINDOWS_SDK_VERSION)),0x0502,0x0600) \
- -D_WIN32_IE=0x0700 \
+ -D_WIN32_WINNT=0x0601 \
-DWIN32 \
-DWNT \
-DNOMINMAX \
commit 1a3718c3f23c0b567874a0272d368dc27552dd97
Author: Michael Stahl <mstahl at redhat.com>
AuthorDate: Fri Jun 2 22:38:06 2017 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:06 2019 +0200
scp2: package 64-bit MSVC runtimes for explorer extensions
Not a backport because master is a bit too refactored now.
Reviewed-on: https://gerrit.libreoffice.org/38365
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit ab4344c34ddf048adf9a3fad0dd1fa2970935550)
Conflicts:
scp2/source/winexplorerext/file_winexplorerext.scp
Change-Id: I1eccb99252fb66dc1fcc9cb5af978c61717ff629
diff --git a/scp2/source/winexplorerext/file_winexplorerext.scp b/scp2/source/winexplorerext/file_winexplorerext.scp
index 7567896b4b9f..7ca1f9c6a63d 100644
--- a/scp2/source/winexplorerext/file_winexplorerext.scp
+++ b/scp2/source/winexplorerext/file_winexplorerext.scp
@@ -85,4 +85,15 @@ End
#endif
+#if defined(WITH_VC140_REDIST) || defined(WITH_VC150_REDIST)
+
+File gid_File_X64_Redist
+ Styles = (FILELIST, USE_INTERNAL_RIGHTS, PACKED);
+ Dir = FILELIST_DIR;
+ Name = "msvc_dlls.filelist";
+ ComponentCondition = "VersionNT64";
+End
+
+#endif
+
#endif
diff --git a/scp2/source/winexplorerext/module_winexplorerext.scp b/scp2/source/winexplorerext/module_winexplorerext.scp
index 440945e89096..b71153cd0052 100644
--- a/scp2/source/winexplorerext/module_winexplorerext.scp
+++ b/scp2/source/winexplorerext/module_winexplorerext.scp
@@ -49,9 +49,6 @@ Module gid_Module_Optional_Winexplorerext_x64
Dirs = (gid_Dir_Shlxthdl);
Files = (auto_winexplorerextwin64_ALL,
auto_winexplorerextwin64nt6_ALL,
- gid_File_Lib_Msvcp100,
- gid_File_Lib_Msvcr100,
- gid_File_Lib_Msvcp110,
- gid_File_Lib_Msvcr110);
+ gid_File_X64_Redist);
End
#endif
commit 2d086ca4e122fb63f11e99684a13679766856d7f
Author: David Ostrovsky <david at ostrovsky.org>
AuthorDate: Sat Jan 21 11:44:33 2017 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:06 2019 +0200
tdf#105311 VC++ Runtime installed in wrong directory
Starting from MSVC 14.0, the directory table layout of VC++ Runtime merge
module changed. As consequence, all MSI produced with newer compilers,
including MSVC 15.0 (aka VS 2017) are broken in term that the VC++
Runtime DLLs are installed in the wrong directory, e.g.: C:\System64.
According to the specification for merging merge module (msm), see:
"Authoring Merge Module Directory Tables": [1], custom action 51 (set
property) must be emitted for every directory name in the merge module
directory table if the directory name is starting with the standard
directory name.
Quoting it here:
"
When a predefined directory is included in a merge module, the merge
tool automatically adds a Custom Action Type 51 to the target database.
The merge module author must ensure that a CustomAction table is also
included. The CustomAction table may be empty, but this table is required
to exist in the target database and ensures that the modified predefined
directories are written to the correct locations. For example, when a
system directory is included in a merge module, the merge module author
must ensure that a Custom Action table exists.
Note that the matching algorithm for the generation of these type 51
custom actions only checks that the directory name begins with one of
the predefined SystemFolder properties. It does not verify that the
directory name exactly equals the directory property. Any directory
beginning with one of these standard folder names gets a type 51 custom
action, even if the rest of the name is not a GUID. Authors need to take
care that this does not generate false positive matches, and unintended
custom action generation, on derivative primary keys that begin with one
of the SystemFolder properties."
Rectify the problem by analyzing the directory table from the merge
module, checking whether the directory name starts with the standard
prefix name and if it is the case, emitting custom action 51 to set this
variable to the standard directory name.
Implementation details:
We use the existing facility for emitting the custom action table events
including referencing them in the corresponding sequence tables. Given
that the specification above doesn't mention what sequence table should
be referencing this emitted custom action, we reversed engineer this
information from WiX toolkit. Merging the VC++ CRT module with WiX
toolkit and investigating the resulting MSI with Orca MSI reader, reveals
that these sequence tables were referencing from these sequence tables:
* AdminExecuteSequence
* AdminUISequence
* AdvtExecuteSequence
* InstallExecuteSequence
* InstallUISequence
Replicate this behaviour here as well. Note, though, that custom actions
are generally not referenced in AdminUISequence and AdvtExecuteSequence
tables in LibreOffice MSI building tool chain.
Rendering of the custom action is achieved by programmatic emulation of
custom action in SCP module. Consider this similar SCP module based
action:
Name = "MigrateInstallPath";
Typ = "321";
Source = "shlxtmsi.dll";
Target = "MigrateInstallPath";
Inbinarytable = 1;
Assignment1 = ("InstallExecuteSequence", "", "CostInitialize");
Assignment2 = ("InstallUISequence", "", "CostInitialize");
We instantiate the following data structure to emit custom action
System64Folder.3CFBED52_9B44_3A4D_953C_90E456671BA1:
Name = "System64Folder.3CFBED52_9B44_3A4D_953C_90E456671BA1"
Typ = "51"
Source = "System64Folder.3CFBED52_9B44_3A4D_953C_90E456671BA1"
Target = "[System64Folder]"
Styles = "NO_FILES"
Assignment1 = ("AdminExecuteSequence", "", "CostInitialize")
Assignment2 = ("InstallExecuteSequence", "", "CostInitialize")
Assignment3 = ("InstallUISequence", "", "CostInitialize")
[1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa367787%28v=vs.85%29.aspx
Change-Id: I2fbd37ff63298d99b2ba1b6afe6e875f56d8e378
Reviewed-on: https://gerrit.libreoffice.org/33366
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: David Ostrovsky <david at ostrovsky.org>
(cherry picked from commit 30473907a565764eb35a19051dc0d52704cf7bb7)
diff --git a/solenv/bin/modules/installer.pm b/solenv/bin/modules/installer.pm
index 605aec25e663..eb6ec70aafb9 100644
--- a/solenv/bin/modules/installer.pm
+++ b/solenv/bin/modules/installer.pm
@@ -519,9 +519,15 @@ sub run {
if ( $installer::globals::updatedatabase )
{
($uniquefilename, $revuniquefilename, $revshortfilename, $allupdatesequences, $allupdatecomponents, $allupdatefileorder, $allupdatecomponentorder, $shortdirname, $componentid, $componentidkeypath, $alloldproperties, $allupdatelastsequences, $allupdatediskids) = installer::windows::update::create_database_hashes($refdatabase);
- if ( $mergemodulesarrayref > -1 ) { installer::windows::update::readmergedatabase($mergemodulesarrayref, $languagestringref, $includepatharrayref); }
}
}
+
+ # Always analyze the merge module.
+ # We need to investigate the directory table in merge module to emit
+ # custom action for directory names that start with standard prefix
+ if ( $mergemodulesarrayref > -1 ) {
+ installer::windows::update::readmergedatabase($mergemodulesarrayref, $languagestringref, $includepatharrayref);
+ }
}
##############################################
@@ -1510,6 +1516,24 @@ sub run {
installer::windows::idtglobal::addcustomactions($languageidtdir, $windowscustomactionsarrayref, $filesinproductlanguageresolvedarrayref);
+ installer::logger::print_message( "... Analyze if custom action table must be patched with merge module directory names ...\n" );
+
+ my @customactions = ();
+ for my $e (keys %installer::globals::merge_directory_hash) {
+ my $var;
+ installer::logger::print_message( "... analyzing directory from merge module: $e\n");
+ if (installer::windows::directory::has_standard_directory_prefix($e, \$var)) {
+ installer::logger::print_message( "... emitting custom action to set the var $e to directory: $var\n");
+ push(@customactions, installer::windows::idtglobal::emit_custom_action_for_standard_directory($e, $var));
+ }
+ }
+
+ if (@customactions) {
+ installer::logger::print_message( "... Patching custom action table with merge module directory names ...\n" );
+ #print Dumper(@customactions);
+ installer::windows::idtglobal::addcustomactions($languageidtdir, \@customactions, $filesinproductlanguageresolvedarrayref);
+ }
+
# Then the language specific msi database can be created
if ( $installer::globals::iswin || $installer::globals::packageformat eq 'msi' )
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index 5a7423aa48f8..c09b696c766c 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -159,6 +159,7 @@ BEGIN
%merge_media_line = ();
%merge_allfeature_hash = ();
%merge_alldirectory_hash = ();
+ %merge_directory_hash = ();
%copy_msm_files = ();
$mergefeaturecollected = 0;
$mergedirectoriescollected = 0;
diff --git a/solenv/bin/modules/installer/windows/directory.pm b/solenv/bin/modules/installer/windows/directory.pm
index a1d677393334..b29fa13c045a 100644
--- a/solenv/bin/modules/installer/windows/directory.pm
+++ b/solenv/bin/modules/installer/windows/directory.pm
@@ -29,6 +29,36 @@ use installer::windows::msiglobal;
# Collecting all directory trees in global hash
##############################################################
+my @msistandarddirectorynames = qw(
+ AdminToolsFolder
+ AppDataFolder
+ CommonAppDataFolder
+ CommonFiles64Folder
+ CommonFilesFolder
+ DesktopFolder
+ FavoritesFolder
+ FontsFolder
+ LocalAppDataFolder
+ MyPicturesFolder
+ NetHoodFolder
+ PersonalFolder
+ PrintHoodFolder
+ ProgramFiles64Folder
+ ProgramFilesFolder
+ ProgramMenuFolder
+ RecentFolder
+ SendToFolder
+ StartMenuFolder
+ StartupFolder
+ System16Folder
+ System64Folder
+ SystemFolder
+ TempFolder
+ TemplateFolder
+ WindowsFolder
+ WindowsVolume
+);
+
sub collectdirectorytrees
{
my ( $directoryref ) = @_;
@@ -569,4 +599,36 @@ sub create_directory_table
}
}
+################################################
+# Check if the string starts with another string
+################################################
+
+sub starts_with
+{
+ my ($first, $second) = @_;
+
+ return substr($first, 0, length($second)) eq $second;
+}
+
+###############################################
+# Check if the directory prefix is a standard
+# directory name. If it is the case, then the
+# standard directory name is returned in $var.
+###############################################
+
+sub has_standard_directory_prefix
+{
+ my ($dir, $var) = @_;
+
+ for my $d (@msistandarddirectorynames) {
+ if (starts_with($dir, $d) && $dir ne $d) {
+ installer::logger::print_message("... match found: [$d]\n");
+ ${$var} = $d;
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
1;
diff --git a/solenv/bin/modules/installer/windows/idtglobal.pm b/solenv/bin/modules/installer/windows/idtglobal.pm
index d9d2f9e2c238..2fa46fbbdb6a 100644
--- a/solenv/bin/modules/installer/windows/idtglobal.pm
+++ b/solenv/bin/modules/installer/windows/idtglobal.pm
@@ -1834,4 +1834,29 @@ sub setbidiattributes
push(@installer::globals::logfileinfo, $infoline);
}
+###############################################
+# Emit custom action 51 for setting standard
+# directory variable. Reference to a hash is
+# returned, represented the custom action.
+# This can be passed in to addcustomaction
+# method.
+###############################################
+
+sub emit_custom_action_for_standard_directory
+{
+ my ($dir, $var) = @_;
+ my %action = ();
+
+ $action{'Name'} = $dir;
+ $action{'Typ'} = "51";
+ $action{'Source'} = $dir;
+ $action{'Target'} = "[$var]";
+ $action{'Styles'} = "NO_FILE";
+ $action{'Assignment1'} = '("AdminExecuteSequence", "", "CostInitialize")';
+ $action{'Assignment2'} = '("InstallExecuteSequence", "", "CostInitialize")';
+ $action{'Assignment3'} = '("InstallUISequence", "", "CostInitialize")';
+
+ return \%action;
+}
+
1;
diff --git a/solenv/bin/modules/installer/windows/update.pm b/solenv/bin/modules/installer/windows/update.pm
index 0edaaf2d8d91..45c47ed7ab0d 100644
--- a/solenv/bin/modules/installer/windows/update.pm
+++ b/solenv/bin/modules/installer/windows/update.pm
@@ -183,6 +183,9 @@ sub read_all_tables_from_msidatabase
if ( ! -f $longonefilename ) { installer::exiter::exit_program("ERROR: Could not find idt file: $longonefilename!", "read_all_tables_from_msidatabase"); }
my $filecontent = installer::files::read_file($longonefilename);
my $idtcontent = analyze_idt_file($filecontent);
+ if ($onefilename eq "Directory.idt") {
+ collect_directories($filecontent);
+ }
my $key = $onefilename;
$key =~ s/\.idt\s*$//;
$database{$key} = $idtcontent;
@@ -406,6 +409,31 @@ sub readdatabase
return $database;
}
+#########################################################################
+# Reading the file "Directory.idt".
+#########################################################################
+
+sub collect_directories
+{
+ my ($filecontent) = @_;
+
+ for ( my $i = 0; $i <= $#{$filecontent}; $i++ )
+ {
+ if ( $i <= 2 ) { next; } # ignoring first three lines
+ if ( ${$filecontent}[$i] =~ /^\s*$/ ) { next; } # ignoring empty lines
+ # Format: Directory Directory_Parent DefaultDir
+ if ( ${$filecontent}[$i] =~ /^\s*(.+?)\t(.*?)\t(.*?)\s*$/ )
+ {
+ $installer::globals::merge_directory_hash{$1} = 1;
+ }
+ else
+ {
+ my $linecount = $i + 1;
+ installer::exiter::exit_program("ERROR: Unknown line format in table \"$idtfilename\" (line $linecount) !", "collect_directories");
+ }
+ }
+}
+
#################################################################################
# Files can be included in merge modules. This is also important for update.
#################################################################################
commit b5a9b224e4d5d6d6ca1450bb72cfbedaf198acad
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Jul 3 08:33:34 2018 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:06 2019 +0200
const fixes for python3-devel-3.7.0-1.fc29.x86_64
Change-Id: Ia16a8b828e11ce36e9bb77ecf9e8a1179bd9b90c
Reviewed-on: https://gerrit.libreoffice.org/56841
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit 76a29148be63cb006a7e25e312dc93acc93e071f)
diff --git a/pyuno/source/module/pyuno_impl.hxx b/pyuno/source/module/pyuno_impl.hxx
index 0452da7cef6f..4a12ad3136d2 100644
--- a/pyuno/source/module/pyuno_impl.hxx
+++ b/pyuno/source/module/pyuno_impl.hxx
@@ -80,7 +80,7 @@ inline PyObject* PyStr_FromString(const char *string)
return PyUnicode_FromString(string);
}
-inline char * PyStr_AsString(PyObject *object)
+inline char const * PyStr_AsString(PyObject *object)
{
return PyUnicode_AsUTF8(object);
}
diff --git a/pyuno/source/module/pyuno_type.cxx b/pyuno/source/module/pyuno_type.cxx
index c2472e478029..f35ddf4ace6d 100644
--- a/pyuno/source/module/pyuno_type.cxx
+++ b/pyuno/source/module/pyuno_type.cxx
@@ -155,7 +155,7 @@ Any PyEnum2Enum( PyObject *obj ) throw ( RuntimeException )
}
OUString strTypeName( OUString::createFromAscii( PyStr_AsString( typeName.get() ) ) );
- char *stringValue = PyStr_AsString( value.get() );
+ char const *stringValue = PyStr_AsString( value.get() );
TypeDescription desc( strTypeName );
if( desc.is() )
diff --git a/pyuno/source/module/pyuno_util.cxx b/pyuno/source/module/pyuno_util.cxx
index ede4cd6f01c0..8e3d74287421 100644
--- a/pyuno/source/module/pyuno_util.cxx
+++ b/pyuno/source/module/pyuno_util.cxx
@@ -64,7 +64,7 @@ OUString pyString2ustring( PyObject *pystr )
#else
#if PY_MAJOR_VERSION >= 3
Py_ssize_t size(0);
- char *pUtf8(PyUnicode_AsUTF8AndSize(pystr, &size));
+ char const *pUtf8(PyUnicode_AsUTF8AndSize(pystr, &size));
ret = OUString(pUtf8, size, RTL_TEXTENCODING_UTF8);
#else
PyObject* pUtf8 = PyUnicode_AsUTF8String(pystr);
commit 32b3051ded2e2c8ca07cb66b8bc130cc21456d58
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Dec 17 00:23:24 2018 +0300
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 26 17:26:06 2019 +0200
tdf#122134: use CurrentMajorVersionNumber to filter out Windows 10
On Windows 8.1, the one that is problematic to tell from Windows 10
(because the latter also exposes its version as 603 to the msiexec),
the registry value doesn't exist at
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion
but let's play safe and also check for "#6" value just in case.
Reference:
https://stackoverflow.com/questions/31072543/reliable-way-to-get-windows-version-from-registry
Thanks to Mitchell <blazer64 at gmail.com> for the idea!
Reviewed-on: https://gerrit.libreoffice.org/65231
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
Tested-by: Mike Kaganski <mike.kaganski at collabora.com>
(cherry picked from commit d87fa557ff58c3b9f5c9079a1d7595e095694111)
Reviewed-on: https://gerrit.libreoffice.org/65242
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 72f2fbc75dc254ea8e13527b592bd0b4fb946bab)
Conflicts:
instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt
Change-Id: Ic907c4d992a7cb1d12e392686c19cd6fd6da3c7c
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt
index 3968375a8815..4bc5b05f6d9a 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt
@@ -5,3 +5,4 @@ INSTALLLOCATION installuser
INSTALLLOCATION installuser_
INSTALLLOCATION installmachine
INSTALLLOCATION installmachine_
+WINMAJORVER WinMajorVer
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt
index 44fb9f500387..b3eaa2342d9f 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt
@@ -42,7 +42,7 @@ ProgressType3 installs
Quickstarterlinkname QUICKSTARTERLINKNAMETEMPLATE
RebootYesNo Yes
ReinstallModeText omus
-SecureCustomProperties NEWPRODUCTS;OLDPRODUCTS;WIN81S14
+SecureCustomProperties NEWPRODUCTS;OLDPRODUCTS;WIN81S14;WINMAJORVER
SetupType Typical
SELECT_WORD 0
SELECT_EXCEL 0
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt
index c082322086ad..7788815d3a6e 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt
@@ -5,3 +5,4 @@ installuser 1 Software\LibreOffice\Layers\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION]
installuser_ 1 Software\LibreOffice\Layers_\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2
installmachine 2 Software\LibreOffice\Layers\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2
installmachine_ 2 Software\LibreOffice\Layers_\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2
+WinMajorVer 2 Software\Microsoft\Windows NT\CurrentVersion CurrentMajorVersionNumber 2
diff --git a/scp2/source/ooo/ucrt.scp b/scp2/source/ooo/ucrt.scp
index ae2eb27a4dbe..a2d6965e2ecb 100644
--- a/scp2/source/ooo/ucrt.scp
+++ b/scp2/source/ooo/ucrt.scp
@@ -111,7 +111,7 @@ WindowsCustomAction gid_Customaction_check_win81x64_ucrt
Source = "InstMSUBinary";
Target = "Windows81-KB2999226-x64msu";
Inbinarytable = 0;
- Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 603 And VersionNT64", "check_win8x64_ucrt");
+ Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 603 And (Not WINMAJORVER Or WINMAJORVER = \"#6\") And VersionNT64", "check_win8x64_ucrt");
Styles = "NO_FILE";
End
@@ -147,7 +147,7 @@ WindowsCustomAction gid_Customaction_check_win81x32_ucrt
Source = "InstMSUBinary";
Target = "Windows81-KB2999226-x86msu";
Inbinarytable = 0;
- Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 603 And Not VersionNT64", "check_win8x32_ucrt");
+ Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 603 And (Not WINMAJORVER Or WINMAJORVER = \"#6\") And Not VersionNT64", "check_win8x32_ucrt");
Styles = "NO_FILE";
End
commit 40353b59fc6c8b7077a6dc279af852d9d0edfd8d
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Apr 12 15:18:58 2018 +0300
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list