Merge branch 'c8' into a8
This commit is contained in:
commit
897862ef3b
@ -0,0 +1,50 @@
|
||||
From 78fd31b17931e1217d3b11fcbd13a41d79d99055 Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Bergmann <sbergman@redhat.com>
|
||||
Date: Wed, 23 Sep 2020 11:41:05 +0200
|
||||
Subject: [PATCH] Convert attribute value to UTF-8 when passing it to libxml2
|
||||
|
||||
Using toUtf8, requiring the OUString to actually contain well-formed data, but
|
||||
which is likely OK for this test-code--only function, and is also what similar
|
||||
dumpAsXml functions e.g. in editeng/source/items/textitem.cxx already use.
|
||||
|
||||
This appears to have been broken ever since the code's introduction in
|
||||
553f10c71a2cc92f5f5890e24948f5277e3d2758 "add dumpAsXml() to more pool items",
|
||||
and it would typically only have written the leading zero or one
|
||||
(depending on the architecture's endianness) characters. (I ran across it on
|
||||
big-endian s390x, where CppunitTest_sd_tiledrendering
|
||||
SdTiledRenderingTest::testTdf104405 failed because of
|
||||
|
||||
> Entity: line 2: parser error : Input is not proper UTF-8, indicate encoding !
|
||||
> Bytes: 0xCF 0x22 0x2F 0x3E
|
||||
> ation=""/><SfxPoolItem whichId="4017" typeName="13SvxBulletItem" presentation="%
|
||||
> ^
|
||||
|
||||
apparently reported from within libxml2.)
|
||||
|
||||
Change-Id: I4b116d3be84098bd8b8a13b6937da70a1ee02c7f
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103236
|
||||
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
||||
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
||||
Tested-by: Jenkins
|
||||
(cherry picked from commit fd9422febc384208558487bfe4a69ec89ab0ddca)
|
||||
---
|
||||
svl/source/items/poolitem.cxx | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
|
||||
index ec37b68d3417..ad07a0b60b4b 100644
|
||||
--- a/svl/source/items/poolitem.cxx
|
||||
+++ b/svl/source/items/poolitem.cxx
|
||||
@@ -548,7 +548,8 @@ void SfxPoolItem::dumpAsXml(xmlTextWriterPtr pWriter) const
|
||||
OUString rText;
|
||||
IntlWrapper aIntlWrapper(SvtSysLocale().GetUILanguageTag());
|
||||
if (GetPresentation( SfxItemPresentation::Complete, MapUnit::Map100thMM, MapUnit::Map100thMM, rText, aIntlWrapper))
|
||||
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(rText.getStr()));
|
||||
+ xmlTextWriterWriteAttribute(
|
||||
+ pWriter, BAD_CAST("presentation"), BAD_CAST(rText.toUtf8().getStr()));
|
||||
xmlTextWriterEndElement(pWriter);
|
||||
}
|
||||
|
||||
--
|
||||
2.33.1
|
||||
|
@ -0,0 +1,65 @@
|
||||
From 41594786266265c1b7d5116ab85b38af0cd1fd59 Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Bergmann <sbergman@redhat.com>
|
||||
Date: Wed, 23 Sep 2020 12:01:35 +0200
|
||||
Subject: [PATCH] Correctly read PNG into bitmaps N32BitTcA... formats (where
|
||||
alpha comes first)
|
||||
|
||||
This appears to be a regression introduced with
|
||||
86ea64f216819696cd86d1926aff0a138ace2baf "Support for native 32bit Bitmap in VCL
|
||||
and SVP (cairo) backend". It caused CppunitTest_vcl_png_test to fail on
|
||||
(big-endian) Linux s390x with
|
||||
|
||||
> vcl/qa/cppunit/png/PngFilterTest.cxx:176:PngFilterTest::testPng
|
||||
> equality assertion failed
|
||||
> - Expected: c[ff000040]
|
||||
> - Actual : c[0000ff40]
|
||||
|
||||
where eFormat happens to be ScanlineFormat::N32BitTcArgb, vs.
|
||||
ScanlineFormat::N32BitTcBgra on e.g. Linux x86-64 (and which thus didn't notice
|
||||
the lack of support for N32BitTcA... formats where alpha goes first instead of
|
||||
last).
|
||||
|
||||
Change-Id: Id6030468718f6ef831b42f2b5ad7ba2c4c46a805
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103240
|
||||
Tested-by: Jenkins
|
||||
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
||||
(cherry picked from commit 0387077e6647d7a30fd36d4ec41dfc559afe45c3)
|
||||
---
|
||||
vcl/source/filter/png/PngImageReader.cxx | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/vcl/source/filter/png/PngImageReader.cxx b/vcl/source/filter/png/PngImageReader.cxx
|
||||
index 958cae34eb46..6e9f3825face 100644
|
||||
--- a/vcl/source/filter/png/PngImageReader.cxx
|
||||
+++ b/vcl/source/filter/png/PngImageReader.cxx
|
||||
@@ -188,6 +188,8 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool bUseBitmap32)
|
||||
for (auto& rRow : aRows)
|
||||
rRow.resize(aRowSizeBytes, 0);
|
||||
|
||||
+ auto const alphaFirst = (eFormat == ScanlineFormat::N32BitTcAbgr
|
||||
+ || eFormat == ScanlineFormat::N32BitTcArgb);
|
||||
for (int pass = 0; pass < nNumberOfPasses; pass++)
|
||||
{
|
||||
for (png_uint_32 y = 0; y < height; y++)
|
||||
@@ -199,10 +201,17 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, bool bUseBitmap32)
|
||||
for (size_t i = 0; i < aRowSizeBytes; i += 4)
|
||||
{
|
||||
sal_Int8 alpha = pRow[i + 3];
|
||||
+ if (alphaFirst)
|
||||
+ {
|
||||
+ pScanline[iColor++] = alpha;
|
||||
+ }
|
||||
pScanline[iColor++] = vcl::bitmap::premultiply(pRow[i + 0], alpha);
|
||||
pScanline[iColor++] = vcl::bitmap::premultiply(pRow[i + 1], alpha);
|
||||
pScanline[iColor++] = vcl::bitmap::premultiply(pRow[i + 2], alpha);
|
||||
- pScanline[iColor++] = alpha;
|
||||
+ if (!alphaFirst)
|
||||
+ {
|
||||
+ pScanline[iColor++] = alpha;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.33.1
|
||||
|
116
SOURCES/0001-Fix-endianness-issues-in-OOX-crypto-routines.patch
Normal file
116
SOURCES/0001-Fix-endianness-issues-in-OOX-crypto-routines.patch
Normal file
@ -0,0 +1,116 @@
|
||||
From 96b088a62174a70441ebe959495756e9d86203a2 Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Bergmann <sbergman@redhat.com>
|
||||
Date: Thu, 24 Sep 2020 14:51:16 +0200
|
||||
Subject: [PATCH] Fix endianness issues in OOX crypto routines
|
||||
|
||||
...without which CppunitTest_sw_ooxmlencryption failed on (big-endian) s390x:
|
||||
|
||||
* The 32-bit segment counter in AgileEngine::de-/encrypt apparently needs to be
|
||||
stored in LSB format (at least, if it is, CppunitTest_sw_ooxmlencryption
|
||||
ultimately succeeded, whereas otherwise it failed).
|
||||
|
||||
* The UTF-16 string in Standard2007Engine::calculateEncryptionKey apparently
|
||||
needs to be in LSB format (at least, if it is, CppunitTest_sw_ooxmlencryption
|
||||
ultimately succeeded, whereas otherwise it failed).
|
||||
|
||||
* The various 32-bit values in the EncryptionStandardHeader and
|
||||
EncryptionVerifierAES data structures apparently need to be written out in LSB
|
||||
format in Standard2007Engine::writeEncryptionInfo, given that they are always
|
||||
read in LSB format in Standard2007Engine::readEncryptionInfo.
|
||||
|
||||
Change-Id: I3a1efbfe324b1bbd539b88dc5d40bb44f9676ffa
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103315
|
||||
Tested-by: Jenkins
|
||||
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
||||
(cherry picked from commit 646a69757b928aeaf6e0d0d41c4b30c02803a3a3)
|
||||
---
|
||||
oox/source/crypto/AgileEngine.cxx | 16 +++++++++-----
|
||||
oox/source/crypto/Standard2007Engine.cxx | 28 +++++++++++++++++-------
|
||||
2 files changed, 30 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx
|
||||
index 7c2a0e9c93d2..0fc972bf2ca5 100644
|
||||
--- a/oox/source/crypto/AgileEngine.cxx
|
||||
+++ b/oox/source/crypto/AgileEngine.cxx
|
||||
@@ -457,9 +457,11 @@ bool AgileEngine::decrypt(BinaryXInputStream& aInputStream,
|
||||
|
||||
while ((inputLength = aInputStream.readMemory(inputBuffer.data(), inputBuffer.size())) > 0)
|
||||
{
|
||||
- sal_uInt8* segmentBegin = reinterpret_cast<sal_uInt8*>(&segment);
|
||||
- sal_uInt8* segmentEnd = segmentBegin + sizeof(segment);
|
||||
- std::copy(segmentBegin, segmentEnd, saltWithBlockKey.begin() + saltSize);
|
||||
+ auto p = saltWithBlockKey.begin() + saltSize;
|
||||
+ p[0] = segment & 0xFF;
|
||||
+ p[1] = (segment >> 8) & 0xFF;
|
||||
+ p[2] = (segment >> 16) & 0xFF;
|
||||
+ p[3] = segment >> 24;
|
||||
|
||||
hashCalc(hash, saltWithBlockKey, mInfo.hashAlgorithm);
|
||||
|
||||
@@ -800,9 +802,11 @@ void AgileEngine::encrypt(css::uno::Reference<css::io::XInputStream> & rxInputS
|
||||
inputLength : oox::core::roundUp(inputLength, sal_uInt32(mInfo.blockSize));
|
||||
|
||||
// Update Key
|
||||
- sal_uInt8* segmentBegin = reinterpret_cast<sal_uInt8*>(&nSegment);
|
||||
- sal_uInt8* segmentEnd = segmentBegin + nSegmentByteSize;
|
||||
- std::copy(segmentBegin, segmentEnd, saltWithBlockKey.begin() + saltSize);
|
||||
+ auto p = saltWithBlockKey.begin() + saltSize;
|
||||
+ p[0] = nSegment & 0xFF;
|
||||
+ p[1] = (nSegment >> 8) & 0xFF;
|
||||
+ p[2] = (nSegment >> 16) & 0xFF;
|
||||
+ p[3] = nSegment >> 24;
|
||||
|
||||
hashCalc(hash, saltWithBlockKey, mInfo.hashAlgorithm);
|
||||
|
||||
diff --git a/oox/source/crypto/Standard2007Engine.cxx b/oox/source/crypto/Standard2007Engine.cxx
|
||||
index 38c4e03baf15..e96fc8f841f2 100644
|
||||
--- a/oox/source/crypto/Standard2007Engine.cxx
|
||||
+++ b/oox/source/crypto/Standard2007Engine.cxx
|
||||
@@ -79,12 +79,12 @@ bool Standard2007Engine::calculateEncryptionKey(const OUString& rPassword)
|
||||
std::vector<sal_uInt8> initialData(saltSize + passwordByteLength);
|
||||
std::copy(saltArray, saltArray + saltSize, initialData.begin());
|
||||
|
||||
- const sal_uInt8* passwordByteArray = reinterpret_cast<const sal_uInt8*>(rPassword.getStr());
|
||||
-
|
||||
- std::copy(
|
||||
- passwordByteArray,
|
||||
- passwordByteArray + passwordByteLength,
|
||||
- initialData.begin() + saltSize);
|
||||
+ auto p = initialData.begin() + saltSize;
|
||||
+ for (sal_Int32 i = 0; i != rPassword.getLength(); ++i) {
|
||||
+ auto c = rPassword[i];
|
||||
+ *p++ = c & 0xFF;
|
||||
+ *p++ = c >> 8;
|
||||
+ }
|
||||
|
||||
// use "hash" vector for result of sha1 hashing
|
||||
// calculate SHA1 hash of initialData
|
||||
@@ -223,11 +223,23 @@ void Standard2007Engine::writeEncryptionInfo(BinaryXOutputStream& rStream)
|
||||
sal_uInt32 headerSize = encryptionHeaderSize + cspNameSize;
|
||||
rStream.WriteUInt32(headerSize);
|
||||
|
||||
- rStream.writeMemory(&mInfo.header, encryptionHeaderSize);
|
||||
+ rStream.WriteUInt32(mInfo.header.flags);
|
||||
+ rStream.WriteUInt32(mInfo.header.sizeExtra);
|
||||
+ rStream.WriteUInt32(mInfo.header.algId);
|
||||
+ rStream.WriteUInt32(mInfo.header.algIdHash);
|
||||
+ rStream.WriteUInt32(mInfo.header.keyBits);
|
||||
+ rStream.WriteUInt32(mInfo.header.providedType);
|
||||
+ rStream.WriteUInt32(mInfo.header.reserved1);
|
||||
+ rStream.WriteUInt32(mInfo.header.reserved2);
|
||||
rStream.writeUnicodeArray(lclCspName);
|
||||
rStream.WriteUInt16(0);
|
||||
|
||||
- rStream.writeMemory(&mInfo.verifier, sizeof(msfilter::EncryptionVerifierAES));
|
||||
+ rStream.WriteUInt32(mInfo.verifier.saltSize);
|
||||
+ rStream.writeMemory(&mInfo.verifier.salt, sizeof mInfo.verifier.salt);
|
||||
+ rStream.writeMemory(&mInfo.verifier.encryptedVerifier, sizeof mInfo.verifier.encryptedVerifier);
|
||||
+ rStream.WriteUInt32(mInfo.verifier.encryptedVerifierHashSize);
|
||||
+ rStream.writeMemory(
|
||||
+ &mInfo.verifier.encryptedVerifierHash, sizeof mInfo.verifier.encryptedVerifierHash);
|
||||
}
|
||||
|
||||
void Standard2007Engine::encrypt(css::uno::Reference<css::io::XInputStream> & rxInputStream,
|
||||
--
|
||||
2.33.1
|
||||
|
@ -0,0 +1,59 @@
|
||||
From 9f393ee10ae198063bbe3b71c2c87262e7880a34 Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Bergmann <sbergman@redhat.com>
|
||||
Date: Wed, 23 Sep 2020 11:53:11 +0200
|
||||
Subject: [PATCH] Read MOSDocumentLockFile UTF-16 string data with same
|
||||
endianness
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
...as MSODocumentLockFile::WriteEntryToStream has written it to (i.e.,
|
||||
always as UTF-16LE, assuming that is actually the right format to use). The
|
||||
discrepancy between writing and reading the string data appears to be present
|
||||
ever since the code's introduction in 5db1e20b8b0942dac2d50f3cd34532bb61147020
|
||||
"Introduce new lockfile handler for MSO like lockfiles".
|
||||
|
||||
This caused CppunitTest_svl_lockfiles to fail on (big-endian) s390x Linux with
|
||||
|
||||
> svl/qa/unit/lockfiles/test_lockfiles.cxx:578:(anonymous namespace)::LockfileTest::testWordLockFileRT
|
||||
> equality assertion failed
|
||||
> - Expected: LockFile Test
|
||||
> - Actual : 䰀漀挀欀䘀椀氀攀 吀攀猀琀
|
||||
|
||||
etc.
|
||||
|
||||
Change-Id: I97267aa14a3a926e7fd7bb1d2ce7d2de05d52a64
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103238
|
||||
Tested-by: Jenkins
|
||||
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
||||
(cherry picked from commit 1b9fa11a0869246fe0433b79aab30dd216cf92b6)
|
||||
---
|
||||
svl/source/misc/msodocumentlockfile.cxx | 12 ++++++++++--
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/svl/source/misc/msodocumentlockfile.cxx b/svl/source/misc/msodocumentlockfile.cxx
|
||||
index 9650db03999f..0c857ffb53ec 100644
|
||||
--- a/svl/source/misc/msodocumentlockfile.cxx
|
||||
+++ b/svl/source/misc/msodocumentlockfile.cxx
|
||||
@@ -228,8 +228,16 @@ LockFileEntry MSODocumentLockFile::GetLockData()
|
||||
nUTF16Len = *++pBuf; // use Excel/PowerPoint position
|
||||
|
||||
if (nUTF16Len > 0 && nUTF16Len <= 52) // skip wrong format
|
||||
- aResult[LockFileComponent::OOOUSERNAME]
|
||||
- = OUString(reinterpret_cast<const sal_Unicode*>(pBuf + 2), nUTF16Len);
|
||||
+ {
|
||||
+ OUStringBuffer str(nUTF16Len);
|
||||
+ sal_uInt8 const* p = reinterpret_cast<sal_uInt8 const*>(pBuf + 2);
|
||||
+ for (int i = 0; i != nUTF16Len; ++i)
|
||||
+ {
|
||||
+ str.append(sal_Unicode(p[0] | (sal_uInt32(p[1]) << 8)));
|
||||
+ p += 2;
|
||||
+ }
|
||||
+ aResult[LockFileComponent::OOOUSERNAME] = str.makeStringAndClear();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
return aResult;
|
||||
--
|
||||
2.33.1
|
||||
|
@ -0,0 +1,72 @@
|
||||
From 5c705fbd9e4d231fed87b7e8ac06d8b7d4c6891f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Thu, 12 Aug 2021 12:55:30 +0100
|
||||
Subject: [PATCH] Resolves: tdf#132739 two style tags where there should be
|
||||
just one
|
||||
|
||||
Change-Id: Id9c8c8cc8c5ffdd21ba79ff39a6279cf2ddc8025
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120360
|
||||
Tested-by: Jenkins
|
||||
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
|
||||
---
|
||||
sw/source/filter/html/css1atr.cxx | 4 +++-
|
||||
sw/source/filter/html/htmltabw.cxx | 9 ++++++---
|
||||
sw/source/filter/html/wrthtml.hxx | 2 +-
|
||||
3 files changed, 10 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
|
||||
index 7b1a5cc19be3..c401d95a788f 100644
|
||||
--- a/sw/source/filter/html/css1atr.cxx
|
||||
+++ b/sw/source/filter/html/css1atr.cxx
|
||||
@@ -2113,10 +2113,12 @@ void SwHTMLWriter::OutCSS1_TableFrameFormatOptions( const SwFrameFormat& rFrameF
|
||||
Strm().WriteChar( '\"' );
|
||||
}
|
||||
|
||||
-void SwHTMLWriter::OutCSS1_TableCellBorderHack(SwFrameFormat const& rFrameFormat)
|
||||
+void SwHTMLWriter::OutCSS1_TableCellBordersAndBG(SwFrameFormat const& rFrameFormat, const SvxBrushItem *pBrushItem)
|
||||
{
|
||||
SwCSS1OutMode const aMode( *this,
|
||||
CSS1_OUTMODE_STYLE_OPT_ON|CSS1_OUTMODE_ENCODE|CSS1_OUTMODE_TABLEBOX, nullptr );
|
||||
+ if (pBrushItem)
|
||||
+ OutCSS1_SvxBrush(*this, *pBrushItem, Css1Background::Table, nullptr);
|
||||
OutCSS1_SvxBox(*this, rFrameFormat.GetBox());
|
||||
if (!m_bFirstCSS1Property)
|
||||
{
|
||||
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
|
||||
index 4c83319747b7..63812a9b3ef6 100644
|
||||
--- a/sw/source/filter/html/htmltabw.cxx
|
||||
+++ b/sw/source/filter/html/htmltabw.cxx
|
||||
@@ -424,11 +424,14 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
|
||||
// Avoid non-CSS version in the ReqIF case.
|
||||
rWrt.OutBackground( pBrushItem, false );
|
||||
|
||||
- if( rWrt.m_bCfgOutStyles )
|
||||
- OutCSS1_TableBGStyleOpt( rWrt, *pBrushItem );
|
||||
+ if (!rWrt.m_bCfgOutStyles)
|
||||
+ pBrushItem = nullptr;
|
||||
}
|
||||
|
||||
- rWrt.OutCSS1_TableCellBorderHack(*pBox->GetFrameFormat());
|
||||
+ // tdf#132739 with rWrt.m_bCfgOutStyles of true bundle the brush item css
|
||||
+ // properties into the same "style" tag as the borders so there is only one
|
||||
+ // style tag
|
||||
+ rWrt.OutCSS1_TableCellBordersAndBG(*pBox->GetFrameFormat(), pBrushItem);
|
||||
|
||||
sal_uInt32 nNumFormat = 0;
|
||||
double nValue = 0.0;
|
||||
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
|
||||
index ab282ba652ff..f82325ee50ae 100644
|
||||
--- a/sw/source/filter/html/wrthtml.hxx
|
||||
+++ b/sw/source/filter/html/wrthtml.hxx
|
||||
@@ -484,7 +484,7 @@ public:
|
||||
void writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameFormat& rFrameFormat, const OUString& rAltText, HtmlFrmOpts nFrameOpts);
|
||||
|
||||
void OutCSS1_TableFrameFormatOptions( const SwFrameFormat& rFrameFormat );
|
||||
- void OutCSS1_TableCellBorderHack(const SwFrameFormat& rFrameFormat);
|
||||
+ void OutCSS1_TableCellBordersAndBG(const SwFrameFormat& rFrameFormat, const SvxBrushItem *pBrushItem);
|
||||
void OutCSS1_SectionFormatOptions( const SwFrameFormat& rFrameFormat, const SwFormatCol *pCol );
|
||||
void OutCSS1_FrameFormatOptions( const SwFrameFormat& rFrameFormat, HtmlFrmOpts nFrameOpts,
|
||||
const SdrObject *pSdrObj=nullptr,
|
||||
--
|
||||
2.31.1
|
||||
|
259
SOURCES/0001-backports-to-ease-CVE-backporting.patch
Normal file
259
SOURCES/0001-backports-to-ease-CVE-backporting.patch
Normal file
@ -0,0 +1,259 @@
|
||||
From c2cf13da3bbf756ef3f78251c40d45fc23c27f36 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
||||
Date: Wed, 29 Apr 2020 07:42:24 +0200
|
||||
Subject: [PATCH 1/6] backports to ease CVE backporting
|
||||
|
||||
Remove unnecessary if block
|
||||
|
||||
And format code inside
|
||||
|
||||
Change-Id: Ied0d98935134bf6f7bc8c929645ad5faac9affa3
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93116
|
||||
Tested-by: Jenkins
|
||||
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
||||
(cherry picked from commit cf36fe5eb41910c26d58fb25e54ccf2e0ee01365)
|
||||
|
||||
space out the namespace constant values
|
||||
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88938
|
||||
(cherry picked from commit 5352d45dd4a04f8f02cf7f6ad4169126d3b3586a)
|
||||
|
||||
Change-Id: I30f54bfc1389e91b18e4fee8b83e1b297419899b
|
||||
---
|
||||
include/xmloff/xmlnmspe.hxx | 16 +--
|
||||
.../component/documentdigitalsignatures.cxx | 130 +++++++++---------
|
||||
.../source/helper/xmlsignaturehelper.cxx | 1 +
|
||||
3 files changed, 75 insertions(+), 72 deletions(-)
|
||||
|
||||
diff --git a/include/xmloff/xmlnmspe.hxx b/include/xmloff/xmlnmspe.hxx
|
||||
index a00628b6b999..b079053c38d3 100644
|
||||
--- a/include/xmloff/xmlnmspe.hxx
|
||||
+++ b/include/xmloff/xmlnmspe.hxx
|
||||
@@ -69,7 +69,7 @@ XML_NAMESPACE( XML_NAMESPACE_VERSIONS_LIST, 37U )
|
||||
|
||||
// namespaces for odf extended formats
|
||||
|
||||
-#define XML_NAMESPACE_EXT_BASE 38U
|
||||
+#define XML_NAMESPACE_EXT_BASE 50U
|
||||
#define XML_NAMESPACE_EXT( prefix, index ) \
|
||||
const sal_uInt16 prefix = (XML_NAMESPACE_EXT_BASE+index);
|
||||
|
||||
@@ -82,7 +82,7 @@ XML_NAMESPACE_EXT( XML_NAMESPACE_LO_EXT, 5U )
|
||||
|
||||
// namespaces for OOo formats
|
||||
|
||||
-#define XML_NAMESPACE_OOO_BASE 44U
|
||||
+#define XML_NAMESPACE_OOO_BASE 60U
|
||||
#define XML_NAMESPACE_OOO( prefix, index ) \
|
||||
const sal_uInt16 prefix = (XML_NAMESPACE_OOO_BASE+index);
|
||||
|
||||
@@ -100,7 +100,7 @@ XML_NAMESPACE_OOO( XML_NAMESPACE_CONFIG_OOO, 10U )
|
||||
XML_NAMESPACE_OOO( XML_NAMESPACE_FORM_OOO, 11U )
|
||||
XML_NAMESPACE_OOO( XML_NAMESPACE_SCRIPT_OOO, 12U )
|
||||
|
||||
-#define XML_NAMESPACE_COMPAT_BASE 57U
|
||||
+#define XML_NAMESPACE_COMPAT_BASE 80U
|
||||
#define XML_NAMESPACE_COMPAT( prefix, index ) \
|
||||
const sal_uInt16 prefix = (XML_NAMESPACE_COMPAT_BASE+index);
|
||||
|
||||
@@ -108,14 +108,14 @@ XML_NAMESPACE_COMPAT( XML_NAMESPACE_SVG_COMPAT, 0U )
|
||||
XML_NAMESPACE_COMPAT( XML_NAMESPACE_FO_COMPAT, 1U )
|
||||
XML_NAMESPACE_COMPAT( XML_NAMESPACE_SMIL_COMPAT, 2U )
|
||||
|
||||
-#define XML_NAMESPACE_OASIS_BASE 60U
|
||||
+#define XML_NAMESPACE_OASIS_BASE 90U
|
||||
#define XML_NAMESPACE_OASIS( prefix, index ) \
|
||||
const sal_uInt16 prefix = (XML_NAMESPACE_OASIS_BASE+index);
|
||||
|
||||
XML_NAMESPACE_OASIS( XML_NAMESPACE_DB_OASIS, 0U )
|
||||
XML_NAMESPACE_OASIS( XML_NAMESPACE_REPORT_OASIS, 1U )
|
||||
|
||||
-#define XML_OLD_NAMESPACE_BASE 62U
|
||||
+#define XML_OLD_NAMESPACE_BASE 100U
|
||||
#define XML_OLD_NAMESPACE( prefix, index ) \
|
||||
const sal_uInt16 prefix = (XML_OLD_NAMESPACE_BASE+index);
|
||||
|
||||
@@ -134,9 +134,9 @@ XML_OLD_NAMESPACE( XML_OLD_NAMESPACE_CHART, 10U )
|
||||
XML_OLD_NAMESPACE( XML_OLD_NAMESPACE_SMIL, 11U )
|
||||
|
||||
// experimental namespaces
|
||||
-XML_NAMESPACE( XML_NAMESPACE_FIELD, 100U )
|
||||
-XML_NAMESPACE( XML_NAMESPACE_CSS3TEXT, 103U ) // CSS Text Level 3
|
||||
-XML_NAMESPACE( XML_NAMESPACE_FORMX, 101U ) // form interop extensions
|
||||
+XML_NAMESPACE( XML_NAMESPACE_FIELD, 120U )
|
||||
+XML_NAMESPACE( XML_NAMESPACE_CSS3TEXT, 123U ) // CSS Text Level 3
|
||||
+XML_NAMESPACE( XML_NAMESPACE_FORMX, 121U ) // form interop extensions
|
||||
|
||||
|
||||
#endif // INCLUDED_XMLOFF_XMLNMSPE_HXX
|
||||
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
|
||||
index dcfaad0af773..52cb938a8e0a 100644
|
||||
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
|
||||
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
|
||||
@@ -500,85 +500,87 @@ DocumentDigitalSignatures::ImplVerifySignatures(
|
||||
Sequence< css::security::DocumentSignatureInformation > aInfos(nInfos);
|
||||
css::security::DocumentSignatureInformation* arInfos = aInfos.getArray();
|
||||
|
||||
- if ( nInfos )
|
||||
+ for (int n = 0; n < nInfos; ++n)
|
||||
{
|
||||
- for( int n = 0; n < nInfos; ++n )
|
||||
- {
|
||||
- DocumentSignatureAlgorithm mode = DocumentSignatureHelper::getDocumentAlgorithm(
|
||||
- m_sODFVersion, aSignInfos[n]);
|
||||
- const std::vector< OUString > aElementsToBeVerified =
|
||||
- DocumentSignatureHelper::CreateElementList(
|
||||
- rxStorage, eMode, mode);
|
||||
+ DocumentSignatureAlgorithm mode
|
||||
+ = DocumentSignatureHelper::getDocumentAlgorithm(m_sODFVersion, aSignInfos[n]);
|
||||
+ const std::vector<OUString> aElementsToBeVerified
|
||||
+ = DocumentSignatureHelper::CreateElementList(rxStorage, eMode, mode);
|
||||
|
||||
- const SignatureInformation& rInfo = aSignInfos[n];
|
||||
- css::security::DocumentSignatureInformation& rSigInfo = arInfos[n];
|
||||
+ const SignatureInformation& rInfo = aSignInfos[n];
|
||||
+ css::security::DocumentSignatureInformation& rSigInfo = arInfos[n];
|
||||
|
||||
- if (rInfo.ouGpgCertificate.isEmpty()) // X.509
|
||||
+ if (rInfo.ouGpgCertificate.isEmpty()) // X.509
|
||||
+ {
|
||||
+ if (!rInfo.ouX509Certificate.isEmpty())
|
||||
+ rSigInfo.Signer = xSecEnv->createCertificateFromAscii(rInfo.ouX509Certificate);
|
||||
+ if (!rSigInfo.Signer.is())
|
||||
+ rSigInfo.Signer = xSecEnv->getCertificate(
|
||||
+ rInfo.ouX509IssuerName,
|
||||
+ xmlsecurity::numericStringToBigInteger(rInfo.ouX509SerialNumber));
|
||||
+
|
||||
+ // On Windows checking the certificate path is buggy. It does name matching (issuer, subject name)
|
||||
+ // to find the parent certificate. It does not take into account that there can be several certificates
|
||||
+ // with the same subject name.
|
||||
+ try
|
||||
{
|
||||
- if (!rInfo.ouX509Certificate.isEmpty())
|
||||
- rSigInfo.Signer = xSecEnv->createCertificateFromAscii( rInfo.ouX509Certificate ) ;
|
||||
- if (!rSigInfo.Signer.is())
|
||||
- rSigInfo.Signer = xSecEnv->getCertificate( rInfo.ouX509IssuerName,
|
||||
- xmlsecurity::numericStringToBigInteger( rInfo.ouX509SerialNumber ) );
|
||||
-
|
||||
- // On Windows checking the certificate path is buggy. It does name matching (issuer, subject name)
|
||||
- // to find the parent certificate. It does not take into account that there can be several certificates
|
||||
- // with the same subject name.
|
||||
-
|
||||
- try {
|
||||
- rSigInfo.CertificateStatus = xSecEnv->verifyCertificate(rSigInfo.Signer,
|
||||
- Sequence<Reference<css::security::XCertificate> >());
|
||||
- } catch (SecurityException& ) {
|
||||
- OSL_FAIL("Verification of certificate failed");
|
||||
- rSigInfo.CertificateStatus = css::security::CertificateValidity::INVALID;
|
||||
- }
|
||||
+ rSigInfo.CertificateStatus = xSecEnv->verifyCertificate(
|
||||
+ rSigInfo.Signer, Sequence<Reference<css::security::XCertificate>>());
|
||||
}
|
||||
- else if (xGpgSecEnv.is()) // GPG
|
||||
+ catch (SecurityException&)
|
||||
{
|
||||
- // TODO not ideal to retrieve cert by keyID, might
|
||||
- // collide, or PGPKeyID format might change - can't we
|
||||
- // keep the xCert itself in rInfo?
|
||||
- rSigInfo.Signer = xGpgSecEnv->getCertificate( rInfo.ouGpgKeyID, xmlsecurity::numericStringToBigInteger("") );
|
||||
- rSigInfo.CertificateStatus = xGpgSecEnv->verifyCertificate(rSigInfo.Signer,
|
||||
- Sequence<Reference<css::security::XCertificate> >());
|
||||
+ OSL_FAIL("Verification of certificate failed");
|
||||
+ rSigInfo.CertificateStatus = css::security::CertificateValidity::INVALID;
|
||||
}
|
||||
+ }
|
||||
+ else if (xGpgSecEnv.is()) // GPG
|
||||
+ {
|
||||
+ // TODO not ideal to retrieve cert by keyID, might
|
||||
+ // collide, or PGPKeyID format might change - can't we
|
||||
+ // keep the xCert itself in rInfo?
|
||||
+ rSigInfo.Signer = xGpgSecEnv->getCertificate(
|
||||
+ rInfo.ouGpgKeyID, xmlsecurity::numericStringToBigInteger(""));
|
||||
+ rSigInfo.CertificateStatus = xGpgSecEnv->verifyCertificate(
|
||||
+ rSigInfo.Signer, Sequence<Reference<css::security::XCertificate>>());
|
||||
+ }
|
||||
|
||||
- // Time support again (#i38744#)
|
||||
- Date aDate( rInfo.stDateTime.Day, rInfo.stDateTime.Month, rInfo.stDateTime.Year );
|
||||
- tools::Time aTime( rInfo.stDateTime.Hours, rInfo.stDateTime.Minutes,
|
||||
- rInfo.stDateTime.Seconds, rInfo.stDateTime.NanoSeconds );
|
||||
- rSigInfo.SignatureDate = aDate.GetDate();
|
||||
- rSigInfo.SignatureTime = aTime.GetTime() / tools::Time::nanoPerCenti;
|
||||
+ // Time support again (#i38744#)
|
||||
+ Date aDate(rInfo.stDateTime.Day, rInfo.stDateTime.Month, rInfo.stDateTime.Year);
|
||||
+ tools::Time aTime(rInfo.stDateTime.Hours, rInfo.stDateTime.Minutes,
|
||||
+ rInfo.stDateTime.Seconds, rInfo.stDateTime.NanoSeconds);
|
||||
+ rSigInfo.SignatureDate = aDate.GetDate();
|
||||
+ rSigInfo.SignatureTime = aTime.GetTime() / tools::Time::nanoPerCenti;
|
||||
|
||||
- rSigInfo.SignatureIsValid = ( rInfo.nStatus == css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED );
|
||||
+ rSigInfo.SignatureIsValid
|
||||
+ = (rInfo.nStatus == css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED);
|
||||
|
||||
- // Signature line info (ID + Images)
|
||||
- if (!rInfo.ouSignatureLineId.isEmpty())
|
||||
- rSigInfo.SignatureLineId = rInfo.ouSignatureLineId;
|
||||
+ // Signature line info (ID + Images)
|
||||
+ if (!rInfo.ouSignatureLineId.isEmpty())
|
||||
+ rSigInfo.SignatureLineId = rInfo.ouSignatureLineId;
|
||||
|
||||
- if (rInfo.aValidSignatureImage.is())
|
||||
- rSigInfo.ValidSignatureLineImage = rInfo.aValidSignatureImage;
|
||||
+ if (rInfo.aValidSignatureImage.is())
|
||||
+ rSigInfo.ValidSignatureLineImage = rInfo.aValidSignatureImage;
|
||||
|
||||
- if (rInfo.aInvalidSignatureImage.is())
|
||||
- rSigInfo.InvalidSignatureLineImage = rInfo.aInvalidSignatureImage;
|
||||
-
|
||||
- // OOXML intentionally doesn't sign metadata.
|
||||
- if ( rSigInfo.SignatureIsValid && aStreamHelper.nStorageFormat != embed::StorageFormats::OFOPXML)
|
||||
- {
|
||||
- rSigInfo.SignatureIsValid =
|
||||
- DocumentSignatureHelper::checkIfAllFilesAreSigned(
|
||||
- aElementsToBeVerified, rInfo, mode);
|
||||
- }
|
||||
- if (eMode == DocumentSignatureMode::Content)
|
||||
- {
|
||||
- if (aStreamHelper.nStorageFormat == embed::StorageFormats::OFOPXML)
|
||||
- rSigInfo.PartialDocumentSignature = true;
|
||||
- else
|
||||
- rSigInfo.PartialDocumentSignature = !DocumentSignatureHelper::isOOo3_2_Signature(aSignInfos[n]);
|
||||
- }
|
||||
+ if (rInfo.aInvalidSignatureImage.is())
|
||||
+ rSigInfo.InvalidSignatureLineImage = rInfo.aInvalidSignatureImage;
|
||||
|
||||
+ // OOXML intentionally doesn't sign metadata.
|
||||
+ if (rSigInfo.SignatureIsValid
|
||||
+ && aStreamHelper.nStorageFormat != embed::StorageFormats::OFOPXML)
|
||||
+ {
|
||||
+ rSigInfo.SignatureIsValid = DocumentSignatureHelper::checkIfAllFilesAreSigned(
|
||||
+ aElementsToBeVerified, rInfo, mode);
|
||||
+ }
|
||||
+ if (eMode == DocumentSignatureMode::Content)
|
||||
+ {
|
||||
+ if (aStreamHelper.nStorageFormat == embed::StorageFormats::OFOPXML)
|
||||
+ rSigInfo.PartialDocumentSignature = true;
|
||||
+ else
|
||||
+ rSigInfo.PartialDocumentSignature
|
||||
+ = !DocumentSignatureHelper::isOOo3_2_Signature(aSignInfos[n]);
|
||||
}
|
||||
}
|
||||
+
|
||||
return aInfos;
|
||||
|
||||
}
|
||||
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
|
||||
index 6ec834053a17..22c056e70da1 100644
|
||||
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
|
||||
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
|
||||
@@ -402,6 +402,7 @@ bool XMLSignatureHelper::ReadAndVerifySignatureStorageStream(const css::uno::Ref
|
||||
catch(const uno::Exception&)
|
||||
{
|
||||
DBG_UNHANDLED_EXCEPTION("xmlsecurity.helper");
|
||||
+ mbError = true;
|
||||
}
|
||||
|
||||
mpXSecController->releaseSignatureReader();
|
||||
--
|
||||
2.32.0
|
||||
|
@ -0,0 +1,472 @@
|
||||
From c5a9fb7f00fe4d701d98c4058ad0f506c8dd146f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Tue, 13 Jul 2021 12:38:07 +0100
|
||||
Subject: [PATCH] rhbz#1980800 allow --convert-to csv to write each sheet to a
|
||||
separate file
|
||||
|
||||
Related: tdf#135762 except only currently implemented for command line use
|
||||
|
||||
sample usage:
|
||||
soffice --convert-to csv:"Text - txt - csv (StarCalc)":44,34,UTF8,1,,0,false,true,false,false,false,-1 sample.ods
|
||||
where the new (11th!) final token ("-1") enables writing each sheet to a
|
||||
new file based on the suggested target name so output in this example
|
||||
is files sample-Sheet1.csv and sample-Sheet2.csv
|
||||
|
||||
Only -1 for 'all sheets' vs 0 for existing 'current sheet only' (which
|
||||
is always sheet 0 from the command line) are currently options but the
|
||||
token could be expanded in the future to select specific sheets to
|
||||
export.
|
||||
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118850
|
||||
Tested-by: Jenkins
|
||||
Reviewed-by: Eike Rathke <erack@redhat.com>
|
||||
(cherry picked from commit b8903bc106dad036acb3d117e5c4fc955697fe02)
|
||||
|
||||
Related: tdf#135762 Allow --convert-to csv to specify 1-based sheet number
|
||||
|
||||
Same multifile mechanism as for -1 all sheets is used, so
|
||||
|
||||
soffice --convert-to csv:"Text - txt - csv (StarCalc)":44,34,UTF8,1,,0,false,true,false,false,false,2 sample.ods
|
||||
|
||||
writes a file sample-Sheet2.csv
|
||||
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118971
|
||||
Reviewed-by: Eike Rathke <erack@redhat.com>
|
||||
Tested-by: Jenkins
|
||||
(cherry picked from commit fda91f8be16ba760e360940ebafd6244c648cb8c)
|
||||
|
||||
Related: tdf#135762 Suppress cout if not command line
|
||||
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119294
|
||||
Reviewed-by: Eike Rathke <erack@redhat.com>
|
||||
Tested-by: Jenkins
|
||||
(cherry picked from commit 0cda081c9aa3b3dcb363f97bac60c845ce9a13e0)
|
||||
|
||||
Change-Id: Ib99a120f1a2c8d1008a7a3c59a6b39f572fb346e
|
||||
b9248c9561e4e340c88458ac5dfd159e443a4cfd
|
||||
9431221aadf97739bb197871f25fa151ef4c391c
|
||||
---
|
||||
desktop/source/app/dispatchwatcher.cxx | 50 +++++++--
|
||||
include/sfx2/docfile.hxx | 1 +
|
||||
sc/source/ui/dbgui/imoptdlg.cxx | 16 ++-
|
||||
sc/source/ui/docshell/docsh.cxx | 141 +++++++++++++++++++++----
|
||||
sc/source/ui/inc/docsh.hxx | 2 +-
|
||||
sc/source/ui/inc/imoptdlg.hxx | 6 +-
|
||||
sfx2/source/doc/docfile.cxx | 4 +
|
||||
7 files changed, 184 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
|
||||
index 04140173c6d1..a5365da618e8 100644
|
||||
--- a/desktop/source/app/dispatchwatcher.cxx
|
||||
+++ b/desktop/source/app/dispatchwatcher.cxx
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "dispatchwatcher.hxx"
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <comphelper/processfactory.hxx>
|
||||
+#include <comphelper/string.hxx>
|
||||
#include <comphelper/synchronousdispatch.hxx>
|
||||
#include <com/sun/star/io/IOException.hpp>
|
||||
#include <com/sun/star/util/XCloseable.hpp>
|
||||
@@ -604,6 +605,8 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
|
||||
aFilter = impl_GuessFilter( aOutFile, aDocService );
|
||||
}
|
||||
|
||||
+ bool bMultiFileTarget = false;
|
||||
+
|
||||
if (aFilter.isEmpty())
|
||||
{
|
||||
std::cerr << "Error: no export filter" << std::endl;
|
||||
@@ -611,29 +614,54 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
|
||||
else
|
||||
{
|
||||
sal_Int32 nFilterOptionsIndex = aFilter.indexOf(':');
|
||||
- sal_Int32 nProps = ( 0 < nFilterOptionsIndex ) ? 3 : 2;
|
||||
+ sal_Int32 nProps = ( 0 < nFilterOptionsIndex ) ? 4 : 3;
|
||||
|
||||
if ( !aImgOut.isEmpty() )
|
||||
nProps +=1;
|
||||
Sequence<PropertyValue> conversionProperties( nProps );
|
||||
- conversionProperties[0].Name = "Overwrite";
|
||||
- conversionProperties[0].Value <<= true;
|
||||
+ conversionProperties[0].Name = "ConversionRequestOrigin";
|
||||
+ conversionProperties[0].Value <<= OUString("CommandLine");
|
||||
+ conversionProperties[1].Name = "Overwrite";
|
||||
+ conversionProperties[1].Value <<= true;
|
||||
|
||||
- conversionProperties[1].Name = "FilterName";
|
||||
+ conversionProperties[2].Name = "FilterName";
|
||||
if( 0 < nFilterOptionsIndex )
|
||||
{
|
||||
- conversionProperties[1].Value <<= aFilter.copy(0, nFilterOptionsIndex);
|
||||
+ OUString sFilterName = aFilter.copy(0, nFilterOptionsIndex);
|
||||
+ OUString sFilterOptions = aFilter.copy(nFilterOptionsIndex + 1);
|
||||
+
|
||||
+ if (sFilterName == "Text - txt - csv (StarCalc)")
|
||||
+ {
|
||||
+ sal_Int32 nIdx(0);
|
||||
+ // If the 11th token is '-1' then we export a file
|
||||
+ // per sheet where the file name is based on the suggested
|
||||
+ // output filename concatenated with the sheet name, so adjust
|
||||
+ // the output and overwrite messages
|
||||
+ // If the 11th token is not present or numeric 0 then the
|
||||
+ // default sheet is exported with the output filename. If it
|
||||
+ // is numeric >0 then that sheet (1-based) with the output
|
||||
+ // filename concatenated with the sheet name. So even if
|
||||
+ // that is a single file, the multi file target mechanism is
|
||||
+ // used.
|
||||
+ const OUString aTok(sFilterOptions.getToken(11, ',', nIdx));
|
||||
+ // Actual validity is checked in Calc, here just check for
|
||||
+ // presence of numeric value at start.
|
||||
+ bMultiFileTarget = (!aTok.isEmpty() && aTok.toInt32() != 0);
|
||||
+ }
|
||||
+
|
||||
+ conversionProperties[2].Value <<= sFilterName;
|
||||
|
||||
- conversionProperties[2].Name = "FilterOptions";
|
||||
- conversionProperties[2].Value <<= aFilter.copy(nFilterOptionsIndex + 1);
|
||||
+ conversionProperties[3].Name = "FilterOptions";
|
||||
+ conversionProperties[3].Value <<= sFilterOptions;
|
||||
}
|
||||
else
|
||||
{
|
||||
- conversionProperties[1].Value <<= aFilter;
|
||||
+ conversionProperties[2].Value <<= aFilter;
|
||||
}
|
||||
|
||||
if ( !aImgOut.isEmpty() )
|
||||
{
|
||||
+ assert(conversionProperties[nProps-1].Name.isEmpty());
|
||||
conversionProperties[nProps-1].Name = "ImageFilter";
|
||||
conversionProperties[nProps-1].Value <<= aImgOut;
|
||||
}
|
||||
@@ -645,9 +673,11 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
|
||||
OString aTargetURL8 = OUStringToOString(aTempName, osl_getThreadTextEncoding());
|
||||
if (aDispatchRequest.aRequestType != REQUEST_CAT)
|
||||
{
|
||||
- std::cout << "convert " << aSource8 << " -> " << aTargetURL8;
|
||||
+ std::cout << "convert " << aSource8;
|
||||
+ if (!bMultiFileTarget)
|
||||
+ std::cout << " -> " << aTargetURL8;
|
||||
std::cout << " using filter : " << OUStringToOString(aFilter, osl_getThreadTextEncoding()) << std::endl;
|
||||
- if (FStatHelper::IsDocument(aOutFile))
|
||||
+ if (!bMultiFileTarget && FStatHelper::IsDocument(aOutFile))
|
||||
std::cout << "Overwriting: " << OUStringToOString(aTempName, osl_getThreadTextEncoding()) << std::endl ;
|
||||
}
|
||||
try
|
||||
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
|
||||
index 2019b5738c01..09aae02b1976 100644
|
||||
--- a/include/sfx2/docfile.hxx
|
||||
+++ b/include/sfx2/docfile.hxx
|
||||
@@ -108,6 +108,7 @@ public:
|
||||
const OUString& GetOrigURL() const;
|
||||
|
||||
SfxItemSet * GetItemSet() const;
|
||||
+ css::uno::Sequence<css::beans::PropertyValue> GetArgs() const;
|
||||
void Close(bool bInDestruction = false);
|
||||
void CloseAndRelease();
|
||||
void ReOpen();
|
||||
diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx
|
||||
index 26781924baac..7aa8c8acb061 100644
|
||||
--- a/sc/source/ui/dbgui/imoptdlg.cxx
|
||||
+++ b/sc/source/ui/dbgui/imoptdlg.cxx
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <imoptdlg.hxx>
|
||||
#include <asciiopt.hxx>
|
||||
#include <comphelper/string.hxx>
|
||||
+#include <unotools/charclass.hxx>
|
||||
#include <osl/thread.h>
|
||||
#include <global.hxx>
|
||||
|
||||
@@ -43,6 +44,7 @@ ScImportOptions::ScImportOptions( const OUString& rStr )
|
||||
bSaveNumberAsSuch = true;
|
||||
bSaveFormulas = false;
|
||||
bRemoveSpace = false;
|
||||
+ nSheetToExport = 0;
|
||||
sal_Int32 nTokenCount = comphelper::string::getTokenCount(rStr, ',');
|
||||
if ( nTokenCount >= 3 )
|
||||
{
|
||||
@@ -76,6 +78,16 @@ ScImportOptions::ScImportOptions( const OUString& rStr )
|
||||
bSaveFormulas = rStr.getToken(0, ',', nIdx) == "true";
|
||||
if ( nTokenCount >= 11 )
|
||||
bRemoveSpace = rStr.getToken(0, ',', nIdx) == "true";
|
||||
+ if ( nTokenCount >= 12 )
|
||||
+ {
|
||||
+ const OUString aTok(rStr.getToken(0, ',', nIdx));
|
||||
+ if (aTok == "-1")
|
||||
+ nSheetToExport = -1; // all
|
||||
+ else if (aTok.isEmpty() || CharClass::isAsciiNumeric(aTok))
|
||||
+ nSheetToExport = aTok.toInt32();
|
||||
+ else
|
||||
+ nSheetToExport = -23; // invalid, force error
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,7 +111,9 @@ OUString ScImportOptions::BuildString() const
|
||||
"," +
|
||||
OUString::boolean( bSaveFormulas ) + // "save formulas": not in ScAsciiOptions
|
||||
"," +
|
||||
- OUString::boolean( bRemoveSpace ); // same as "Remove space" in ScAsciiOptions
|
||||
+ OUString::boolean( bRemoveSpace ) + // same as "Remove space" in ScAsciiOptions
|
||||
+ "," +
|
||||
+ OUString::number(nSheetToExport) ; // Only available for command line --convert-to
|
||||
|
||||
return aResult;
|
||||
}
|
||||
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
|
||||
index bd7402231333..1c544fb6fa1a 100644
|
||||
--- a/sc/source/ui/docshell/docsh.cxx
|
||||
+++ b/sc/source/ui/docshell/docsh.cxx
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <sfx2/objface.hxx>
|
||||
#include <sfx2/viewfrm.hxx>
|
||||
#include <svl/documentlockfile.hxx>
|
||||
+#include <svl/fstathelper.hxx>
|
||||
#include <svl/sharecontrolfile.hxx>
|
||||
#include <svl/urihelper.hxx>
|
||||
#include <osl/file.hxx>
|
||||
@@ -120,6 +121,7 @@
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <comphelper/string.hxx>
|
||||
#include <unotools/configmgr.hxx>
|
||||
+#include <unotools/ucbstreamhelper.hxx>
|
||||
#include <uiitems.hxx>
|
||||
#include <dpobject.hxx>
|
||||
#include <markdata.hxx>
|
||||
@@ -1920,7 +1922,7 @@ void escapeTextSep(sal_Int32 nPos, const StrT& rStrDelim, StrT& rStr)
|
||||
|
||||
}
|
||||
|
||||
-void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt )
|
||||
+void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt, SCTAB nTab )
|
||||
{
|
||||
sal_Unicode cDelim = rAsciiOpt.nFieldSepCode;
|
||||
sal_Unicode cStrDelim = rAsciiOpt.nTextSepCode;
|
||||
@@ -1966,7 +1968,6 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
|
||||
|
||||
SCCOL nStartCol = 0;
|
||||
SCROW nStartRow = 0;
|
||||
- SCTAB nTab = GetSaveTab();
|
||||
SCCOL nEndCol;
|
||||
SCROW nEndRow;
|
||||
m_aDocument.GetCellArea( nTab, nEndCol, nEndRow );
|
||||
@@ -2384,35 +2385,129 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
|
||||
}
|
||||
else if (aFltName == pFilterAscii)
|
||||
{
|
||||
- SvStream* pStream = rMed.GetOutStream();
|
||||
- if (pStream)
|
||||
+ OUString sItStr;
|
||||
+ SfxItemSet* pSet = rMed.GetItemSet();
|
||||
+ const SfxPoolItem* pItem;
|
||||
+ if ( pSet && SfxItemState::SET ==
|
||||
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) )
|
||||
{
|
||||
- OUString sItStr;
|
||||
- SfxItemSet* pSet = rMed.GetItemSet();
|
||||
- const SfxPoolItem* pItem;
|
||||
- if ( pSet && SfxItemState::SET ==
|
||||
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) )
|
||||
+ sItStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
|
||||
+ }
|
||||
+
|
||||
+ if ( sItStr.isEmpty() )
|
||||
+ {
|
||||
+ // default for ascii export (from API without options):
|
||||
+ // ISO8859-1/MS_1252 encoding, comma, double quotes
|
||||
+
|
||||
+ ScImportOptions aDefOptions( ',', '"', RTL_TEXTENCODING_MS_1252 );
|
||||
+ sItStr = aDefOptions.BuildString();
|
||||
+ }
|
||||
+
|
||||
+ weld::WaitObject aWait( GetActiveDialogParent() );
|
||||
+ ScImportOptions aOptions( sItStr );
|
||||
+
|
||||
+ if (aOptions.nSheetToExport)
|
||||
+ {
|
||||
+ // Only from command line --convert-to
|
||||
+ bRet = true;
|
||||
+
|
||||
+ // Verbose only from command line, not UI (in case we actually
|
||||
+ // implement that) nor macro filter options.
|
||||
+ bool bVerbose = false;
|
||||
+ const css::uno::Sequence<css::beans::PropertyValue> & rArgs = rMed.GetArgs();
|
||||
+ const auto pProp = std::find_if( rArgs.begin(), rArgs.end(),
|
||||
+ [](const css::beans::PropertyValue& rProp) { return rProp.Name == "ConversionRequestOrigin"; });
|
||||
+ if (pProp != rArgs.end())
|
||||
{
|
||||
- sItStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
|
||||
+ OUString aOrigin;
|
||||
+ pProp->Value >>= aOrigin;
|
||||
+ bVerbose = (aOrigin == "CommandLine");
|
||||
}
|
||||
|
||||
- if ( sItStr.isEmpty() )
|
||||
+ SCTAB nStartTab;
|
||||
+ SCTAB nCount = m_aDocument.GetTableCount();
|
||||
+ if (aOptions.nSheetToExport == -1)
|
||||
{
|
||||
- // default for ascii export (from API without options):
|
||||
- // ISO8859-1/MS_1252 encoding, comma, double quotes
|
||||
-
|
||||
- ScImportOptions aDefOptions( ',', '"', RTL_TEXTENCODING_MS_1252 );
|
||||
- sItStr = aDefOptions.BuildString();
|
||||
+ // All sheets.
|
||||
+ nStartTab = 0;
|
||||
+ }
|
||||
+ else if (0 < aOptions.nSheetToExport && aOptions.nSheetToExport <= nCount)
|
||||
+ {
|
||||
+ // One sheet, 1-based.
|
||||
+ nCount = aOptions.nSheetToExport;
|
||||
+ nStartTab = nCount - 1;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ // Usage error, no export but log.
|
||||
+ if (bVerbose)
|
||||
+ {
|
||||
+ if (aOptions.nSheetToExport < 0)
|
||||
+ std::cout << "Bad sheet number string given." << std::endl;
|
||||
+ else
|
||||
+ std::cout << "No sheet number " << aOptions.nSheetToExport
|
||||
+ << ", number of sheets is " << nCount << std::endl;
|
||||
+ }
|
||||
+ nStartTab = 0;
|
||||
+ nCount = 0;
|
||||
+ SetError(SCERR_EXPORT_DATA);
|
||||
+ bRet = false;
|
||||
}
|
||||
|
||||
- weld::WaitObject aWait( GetActiveDialogParent() );
|
||||
- ScImportOptions aOptions( sItStr );
|
||||
- AsciiSave( *pStream, aOptions );
|
||||
- bRet = true;
|
||||
+ INetURLObject aURLObject(rMed.GetURLObject());
|
||||
+ OUString sExt = aURLObject.CutExtension();
|
||||
+ OUString sBaseName = aURLObject.GetLastName();
|
||||
+ aURLObject.CutLastName();
|
||||
|
||||
- if (m_aDocument.GetTableCount() > 1)
|
||||
- if (!rMed.GetError())
|
||||
- rMed.SetError(SCWARN_EXPORT_ASCII);
|
||||
+ for (SCTAB i = nStartTab; i < nCount; ++i)
|
||||
+ {
|
||||
+ OUString sTabName;
|
||||
+ if (!m_aDocument.GetName(i, sTabName))
|
||||
+ sTabName = OUString::number(i);
|
||||
+ INetURLObject aSheetURLObject(aURLObject);
|
||||
+ OUString sFileName = sBaseName + "-" + sTabName;
|
||||
+ if (!sExt.isEmpty())
|
||||
+ sFileName = sFileName + "." + sExt;
|
||||
+ aSheetURLObject.Append(sFileName);
|
||||
+
|
||||
+ // log similar to DispatchWatcher::executeDispatchRequests
|
||||
+ OUString aOutFile = aSheetURLObject.GetMainURL(INetURLObject::DecodeMechanism::NONE);
|
||||
+ if (bVerbose)
|
||||
+ {
|
||||
+ OUString aDisplayedName;
|
||||
+ if (osl::FileBase::E_None != osl::FileBase::getSystemPathFromFileURL(aOutFile, aDisplayedName))
|
||||
+ aDisplayedName = aOutFile;
|
||||
+ std::cout << "Writing sheet " << OUStringToOString(sTabName, osl_getThreadTextEncoding()) << " -> "
|
||||
+ << OUStringToOString(aDisplayedName, osl_getThreadTextEncoding())
|
||||
+ << std::endl;
|
||||
+
|
||||
+ if (FStatHelper::IsDocument(aOutFile))
|
||||
+ std::cout << "Overwriting: " << OUStringToOString(aDisplayedName, osl_getThreadTextEncoding())
|
||||
+ << std::endl ;
|
||||
+ }
|
||||
+
|
||||
+ std::unique_ptr<SvStream> xStm = ::utl::UcbStreamHelper::CreateStream(aOutFile, StreamMode::TRUNC | StreamMode::WRITE);
|
||||
+ if (!xStm)
|
||||
+ {
|
||||
+ SetError(ERRCODE_IO_CANTCREATE);
|
||||
+ bRet = false;
|
||||
+ break;
|
||||
+ }
|
||||
+ AsciiSave(*xStm, aOptions, i);
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ SvStream* pStream = rMed.GetOutStream();
|
||||
+ if (pStream)
|
||||
+ {
|
||||
+ AsciiSave(*pStream, aOptions, GetSaveTab());
|
||||
+ bRet = true;
|
||||
+
|
||||
+ if (m_aDocument.GetTableCount() > 1)
|
||||
+ if (!rMed.GetError())
|
||||
+ rMed.SetError(SCWARN_EXPORT_ASCII);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
else if (aFltName == pFilterDBase)
|
||||
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
|
||||
index a519f4c87d04..6a075ff6dade 100644
|
||||
--- a/sc/source/ui/inc/docsh.hxx
|
||||
+++ b/sc/source/ui/inc/docsh.hxx
|
||||
@@ -230,7 +230,7 @@ public:
|
||||
|
||||
ScDrawLayer* MakeDrawLayer();
|
||||
|
||||
- void AsciiSave( SvStream& rStream, const ScImportOptions& rOpt );
|
||||
+ void AsciiSave( SvStream& rStream, const ScImportOptions& rOpt, SCTAB nTab );
|
||||
|
||||
void Execute( SfxRequest& rReq );
|
||||
void GetState( SfxItemSet &rSet );
|
||||
diff --git a/sc/source/ui/inc/imoptdlg.hxx b/sc/source/ui/inc/imoptdlg.hxx
|
||||
index bac941c2a377..382067d67813 100644
|
||||
--- a/sc/source/ui/inc/imoptdlg.hxx
|
||||
+++ b/sc/source/ui/inc/imoptdlg.hxx
|
||||
@@ -32,7 +32,8 @@ public:
|
||||
ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, rtl_TextEncoding nEnc )
|
||||
: nFieldSepCode(nFieldSep), nTextSepCode(nTextSep),
|
||||
bFixedWidth(false), bSaveAsShown(false), bQuoteAllText(false),
|
||||
- bSaveNumberAsSuch(true), bSaveFormulas(false), bRemoveSpace(false)
|
||||
+ bSaveNumberAsSuch(true), bSaveFormulas(false), bRemoveSpace(false),
|
||||
+ nSheetToExport(0)
|
||||
{ SetTextEncoding( nEnc ); }
|
||||
|
||||
ScImportOptions& operator=( const ScImportOptions& rCpy ) = default;
|
||||
@@ -51,6 +52,9 @@ public:
|
||||
bool bSaveNumberAsSuch;
|
||||
bool bSaveFormulas;
|
||||
bool bRemoveSpace;
|
||||
+ // "0" for 'current sheet', "-1" for all sheets (each to a separate file),
|
||||
+ // or 1-based specific sheet number (to a separate file).
|
||||
+ sal_Int32 nSheetToExport;
|
||||
};
|
||||
|
||||
#endif // INCLUDED_SC_SOURCE_UI_INC_IMOPTDLG_HXX
|
||||
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
|
||||
index 5d00d39bd837..ccdd3632e6e5 100644
|
||||
--- a/sfx2/source/doc/docfile.cxx
|
||||
+++ b/sfx2/source/doc/docfile.cxx
|
||||
@@ -328,6 +328,8 @@ public:
|
||||
|
||||
util::DateTime m_aDateTime;
|
||||
|
||||
+ uno::Sequence<beans::PropertyValue> m_aArgs;
|
||||
+
|
||||
explicit SfxMedium_Impl();
|
||||
~SfxMedium_Impl();
|
||||
SfxMedium_Impl(const SfxMedium_Impl&) = delete;
|
||||
@@ -3240,6 +3242,7 @@ SfxMedium::SfxMedium( const uno::Sequence<beans::PropertyValue>& aArgs ) :
|
||||
SfxAllItemSet *pParams = new SfxAllItemSet( SfxGetpApp()->GetPool() );
|
||||
pImpl->m_pSet.reset( pParams );
|
||||
TransformParameters( SID_OPENDOC, aArgs, *pParams );
|
||||
+ pImpl->m_aArgs = aArgs;
|
||||
|
||||
OUString aFilterProvider, aFilterName;
|
||||
{
|
||||
@@ -3301,6 +3304,7 @@ SfxMedium::SfxMedium( const uno::Sequence<beans::PropertyValue>& aArgs ) :
|
||||
Init_Impl();
|
||||
}
|
||||
|
||||
+uno::Sequence<beans::PropertyValue> SfxMedium::GetArgs() const { return pImpl->m_aArgs; }
|
||||
|
||||
SfxMedium::SfxMedium( const uno::Reference < embed::XStorage >& rStor, const OUString& rBaseURL, const std::shared_ptr<SfxItemSet>& p ) :
|
||||
pImpl(new SfxMedium_Impl)
|
||||
--
|
||||
2.31.1
|
||||
|
56
SOURCES/0002-CVE-2021-25635.patch
Normal file
56
SOURCES/0002-CVE-2021-25635.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From a9102a384893fd084011e8451867071452031ece Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Mon, 8 Feb 2021 17:05:28 +0000
|
||||
Subject: [PATCH 2/6] CVE-2021-25635
|
||||
|
||||
default to CertificateValidity::INVALID
|
||||
|
||||
so if CertGetCertificateChain fails we don't want validity to be
|
||||
css::security::CertificateValidity::VALID which is what the old default
|
||||
of 0 equates to
|
||||
|
||||
notably
|
||||
|
||||
commit 1e0bc66d16aee28ce8bd9582ea32178c63841902
|
||||
Date: Thu Nov 5 16:55:26 2009 +0100
|
||||
|
||||
jl137: #103420# better logging
|
||||
|
||||
turned the nss equivalent of SecurityEnvironment_NssImpl::verifyCertificate
|
||||
from 0 to CertificateValidity::INVALID like this change does
|
||||
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110561
|
||||
Tested-by: Jenkins
|
||||
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
||||
(cherry picked from commit edeb164c1d8ab64116afee4e2140403a362a1358)
|
||||
|
||||
Change-Id: I5350dbc22d1b9b378da2976d3b0abd728f1f4c27
|
||||
---
|
||||
.../source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
|
||||
index d9b657891b96..4031df289f44 100644
|
||||
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
|
||||
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
|
||||
@@ -755,7 +755,7 @@ sal_Int32 SecurityEnvironment_MSCryptImpl::verifyCertificate(
|
||||
const uno::Reference< css::security::XCertificate >& aCert,
|
||||
const uno::Sequence< uno::Reference< css::security::XCertificate > >& seqCerts)
|
||||
{
|
||||
- sal_Int32 validity = 0;
|
||||
+ sal_Int32 validity = css::security::CertificateValidity::INVALID;
|
||||
PCCERT_CHAIN_CONTEXT pChainContext = nullptr;
|
||||
PCCERT_CONTEXT pCertContext = nullptr;
|
||||
|
||||
@@ -899,7 +899,7 @@ sal_Int32 SecurityEnvironment_MSCryptImpl::verifyCertificate(
|
||||
}
|
||||
else
|
||||
{
|
||||
- SAL_INFO("xmlsecurity.xmlsec", "CertGetCertificateChaine failed.");
|
||||
+ SAL_INFO("xmlsecurity.xmlsec", "CertGetCertificateChain failed.");
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.32.0
|
||||
|
2172
SOURCES/0003-xmlsecurity-replace-XSecParser-implementation.patch
Normal file
2172
SOURCES/0003-xmlsecurity-replace-XSecParser-implementation.patch
Normal file
File diff suppressed because it is too large
Load Diff
397
SOURCES/0004-CVE-2021-25634.patch
Normal file
397
SOURCES/0004-CVE-2021-25634.patch
Normal file
@ -0,0 +1,397 @@
|
||||
From 9ef423d4e7c85629772131b3216b98e17d7b8d7e Mon Sep 17 00:00:00 2001
|
||||
From: Michael Stahl <michael.stahl@allotropia.de>
|
||||
Date: Thu, 18 Feb 2021 19:22:31 +0100
|
||||
Subject: [PATCH 4/6] CVE-2021-25634
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
xmlsecurity: XSecParser confused about multiple timestamps
|
||||
|
||||
LO writes timestamp both to dc:date and xades:SigningTime elements.
|
||||
|
||||
The parser tries to avoid reading multiple dc:date, preferring the first
|
||||
one, but doesn't care about multiple xades:SigningTime, for undocumented
|
||||
reasons.
|
||||
|
||||
Ideally something should check all read values for consistency.
|
||||
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111160
|
||||
Tested-by: Jenkins
|
||||
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
||||
(cherry picked from commit 4ab8d9c09a5873ca0aea56dafa1ab34758d52ef7)
|
||||
|
||||
xmlsecurity: remove XSecController::setPropertyId()
|
||||
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111252
|
||||
Tested-by: Jenkins
|
||||
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
||||
(cherry picked from commit d2a345e1163616fe3201ef1d6c758e2e819214e0)
|
||||
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111908
|
||||
Tested-by: Jenkins
|
||||
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
||||
(cherry picked from commit abe77c4fcb9ea97d9fff07eaea6d8863bcba5b02)
|
||||
|
||||
Change-Id: Ic018ee89797a1c8a4f870ae102af48006de930ef
|
||||
---
|
||||
include/svl/sigstruct.hxx | 7 +-
|
||||
xmlsecurity/inc/xsecctl.hxx | 5 +-
|
||||
xmlsecurity/source/helper/ooxmlsecparser.cxx | 4 +-
|
||||
xmlsecurity/source/helper/xsecctl.cxx | 2 +-
|
||||
xmlsecurity/source/helper/xsecparser.cxx | 81 ++++++++++----------
|
||||
xmlsecurity/source/helper/xsecparser.hxx | 6 --
|
||||
xmlsecurity/source/helper/xsecsign.cxx | 4 +-
|
||||
xmlsecurity/source/helper/xsecverify.cxx | 39 ++++------
|
||||
8 files changed, 68 insertions(+), 80 deletions(-)
|
||||
|
||||
diff --git a/include/svl/sigstruct.hxx b/include/svl/sigstruct.hxx
|
||||
index f6ee242c84d1..7a0296fa9fae 100644
|
||||
--- a/include/svl/sigstruct.hxx
|
||||
+++ b/include/svl/sigstruct.hxx
|
||||
@@ -103,6 +103,9 @@ struct SignatureInformation
|
||||
// XAdES EncapsulatedX509Certificate values
|
||||
std::set<OUString> maEncapsulatedX509Certificates;
|
||||
|
||||
+ OUString ouSignatureId;
|
||||
+ // signature may contain multiple time stamps - check they're consistent
|
||||
+ bool hasInconsistentSigningTime = false;
|
||||
//We also keep the date and time as string. This is done when this
|
||||
//structure is created as a result of a XML signature being read.
|
||||
//When then a signature is added or another removed, then the original
|
||||
@@ -115,8 +118,8 @@ struct SignatureInformation
|
||||
//and the converted time is written back, then the string looks different
|
||||
//and the signature is broken.
|
||||
OUString ouDateTime;
|
||||
- OUString ouSignatureId;
|
||||
- OUString ouPropertyId;
|
||||
+ /// The Id attribute of the <SignatureProperty> element that contains the <dc:date>.
|
||||
+ OUString ouDateTimePropertyId;
|
||||
/// Characters of the <dc:description> element inside the signature.
|
||||
OUString ouDescription;
|
||||
/// The Id attribute of the <SignatureProperty> element that contains the <dc:description>.
|
||||
diff --git a/xmlsecurity/inc/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx
|
||||
index 351c94a2a3e6..7baa219fb13c 100644
|
||||
--- a/xmlsecurity/inc/xsecctl.hxx
|
||||
+++ b/xmlsecurity/inc/xsecctl.hxx
|
||||
@@ -271,8 +271,8 @@ private:
|
||||
void setGpgCertificate( OUString const & ouGpgCert );
|
||||
void setGpgOwner( OUString const & ouGpgOwner );
|
||||
|
||||
- void setDate( OUString const & ouDate );
|
||||
- void setDescription(const OUString& rDescription);
|
||||
+ void setDate(OUString const& rId, OUString const& ouDate);
|
||||
+ void setDescription(OUString const& rId, OUString const& rDescription);
|
||||
void setCertDigest(const OUString& rCertDigest);
|
||||
void setValidSignatureImage(const OUString& rValidSigImg);
|
||||
void setInvalidSignatureImage(const OUString& rInvalidSigImg);
|
||||
@@ -283,7 +283,6 @@ public:
|
||||
|
||||
private:
|
||||
void setId( OUString const & ouId );
|
||||
- void setPropertyId( OUString const & ouPropertyId );
|
||||
|
||||
css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener > prepareSignatureToRead(
|
||||
sal_Int32 nSecurityId );
|
||||
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx b/xmlsecurity/source/helper/ooxmlsecparser.cxx
|
||||
index c22e8c2261bf..a200de60c07a 100644
|
||||
--- a/xmlsecurity/source/helper/ooxmlsecparser.cxx
|
||||
+++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx
|
||||
@@ -192,12 +192,12 @@ void SAL_CALL OOXMLSecParser::endElement(const OUString& rName)
|
||||
}
|
||||
else if (rName == "mdssi:Value")
|
||||
{
|
||||
- m_pXSecController->setDate(m_aMdssiValue);
|
||||
+ m_pXSecController->setDate("", m_aMdssiValue);
|
||||
m_bInMdssiValue = false;
|
||||
}
|
||||
else if (rName == "SignatureComments")
|
||||
{
|
||||
- m_pXSecController->setDescription(m_aSignatureComments);
|
||||
+ m_pXSecController->setDescription("", m_aSignatureComments);
|
||||
m_bInSignatureComments = false;
|
||||
}
|
||||
else if (rName == "X509IssuerName")
|
||||
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx
|
||||
index ab108d13c224..8d5ea68c768b 100644
|
||||
--- a/xmlsecurity/source/helper/xsecctl.cxx
|
||||
+++ b/xmlsecurity/source/helper/xsecctl.cxx
|
||||
@@ -819,7 +819,7 @@ void XSecController::exportSignature(
|
||||
pAttributeList = new SvXMLAttributeList();
|
||||
pAttributeList->AddAttribute(
|
||||
"Id",
|
||||
- signatureInfo.ouPropertyId);
|
||||
+ signatureInfo.ouDateTimePropertyId);
|
||||
pAttributeList->AddAttribute(
|
||||
"Target",
|
||||
"#" + signatureInfo.ouSignatureId);
|
||||
diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx
|
||||
index 5c92e5efa104..9cc9312b4d9f 100644
|
||||
--- a/xmlsecurity/source/helper/xsecparser.cxx
|
||||
+++ b/xmlsecurity/source/helper/xsecparser.cxx
|
||||
@@ -978,6 +978,9 @@ class XSecParser::XadesSigningCertificateContext
|
||||
class XSecParser::XadesSigningTimeContext
|
||||
: public XSecParser::Context
|
||||
{
|
||||
+ private:
|
||||
+ OUString m_Value;
|
||||
+
|
||||
public:
|
||||
XadesSigningTimeContext(XSecParser & rParser,
|
||||
std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
|
||||
@@ -985,20 +988,14 @@ class XSecParser::XadesSigningTimeContext
|
||||
{
|
||||
}
|
||||
|
||||
- virtual void StartElement(
|
||||
- css::uno::Reference<css::xml::sax::XAttributeList> const& /*xAttrs*/) override
|
||||
- {
|
||||
- m_rParser.m_ouDate.clear();
|
||||
- }
|
||||
-
|
||||
virtual void EndElement() override
|
||||
{
|
||||
- m_rParser.m_pXSecController->setDate( m_rParser.m_ouDate );
|
||||
+ m_rParser.m_pXSecController->setDate("", m_Value);
|
||||
}
|
||||
|
||||
virtual void Characters(OUString const& rChars) override
|
||||
{
|
||||
- m_rParser.m_ouDate += rChars;
|
||||
+ m_Value += rChars;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1104,35 +1101,20 @@ class XSecParser::DcDateContext
|
||||
: public XSecParser::Context
|
||||
{
|
||||
private:
|
||||
- bool m_isIgnore = false;
|
||||
+ OUString & m_rValue;
|
||||
|
||||
public:
|
||||
DcDateContext(XSecParser & rParser,
|
||||
- std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
|
||||
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
|
||||
+ OUString & rValue)
|
||||
: XSecParser::Context(rParser, std::move(pOldNamespaceMap))
|
||||
+ , m_rValue(rValue)
|
||||
{
|
||||
}
|
||||
|
||||
- virtual void StartElement(
|
||||
- css::uno::Reference<css::xml::sax::XAttributeList> const& /*xAttrs*/) override
|
||||
- {
|
||||
- m_isIgnore = !m_rParser.m_ouDate.isEmpty();
|
||||
- }
|
||||
-
|
||||
- virtual void EndElement() override
|
||||
- {
|
||||
- if (!m_isIgnore)
|
||||
- {
|
||||
- m_rParser.m_pXSecController->setDate( m_rParser.m_ouDate );
|
||||
- }
|
||||
- }
|
||||
-
|
||||
virtual void Characters(OUString const& rChars) override
|
||||
{
|
||||
- if (!m_isIgnore)
|
||||
- {
|
||||
- m_rParser.m_ouDate += rChars;
|
||||
- }
|
||||
+ m_rValue += rChars;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1140,29 +1122,32 @@ class XSecParser::DcDescriptionContext
|
||||
: public XSecParser::Context
|
||||
{
|
||||
private:
|
||||
- OUString m_Value;
|
||||
+ OUString & m_rValue;
|
||||
|
||||
public:
|
||||
DcDescriptionContext(XSecParser & rParser,
|
||||
- std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
|
||||
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
|
||||
+ OUString & rValue)
|
||||
: XSecParser::Context(rParser, std::move(pOldNamespaceMap))
|
||||
+ , m_rValue(rValue)
|
||||
{
|
||||
}
|
||||
|
||||
- virtual void EndElement() override
|
||||
- {
|
||||
- m_rParser.m_pXSecController->setDescription(m_Value);
|
||||
- }
|
||||
-
|
||||
virtual void Characters(OUString const& rChars) override
|
||||
{
|
||||
- m_Value += rChars;
|
||||
+ m_rValue += rChars;
|
||||
}
|
||||
};
|
||||
|
||||
class XSecParser::DsSignaturePropertyContext
|
||||
: public XSecParser::Context
|
||||
{
|
||||
+ private:
|
||||
+ enum class SignatureProperty { Unknown, Date, Description };
|
||||
+ SignatureProperty m_Property = SignatureProperty::Unknown;
|
||||
+ OUString m_Id;
|
||||
+ OUString m_Value;
|
||||
+
|
||||
public:
|
||||
DsSignaturePropertyContext(XSecParser & rParser,
|
||||
std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
|
||||
@@ -1173,10 +1158,22 @@ class XSecParser::DsSignaturePropertyContext
|
||||
virtual void StartElement(
|
||||
css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
|
||||
{
|
||||
- OUString const ouIdAttr(m_rParser.HandleIdAttr(xAttrs));
|
||||
- if (!ouIdAttr.isEmpty())
|
||||
+ m_Id = m_rParser.HandleIdAttr(xAttrs);
|
||||
+ }
|
||||
+
|
||||
+ virtual void EndElement() override
|
||||
+ {
|
||||
+ switch (m_Property)
|
||||
{
|
||||
- m_rParser.m_pXSecController->setPropertyId( ouIdAttr );
|
||||
+ case SignatureProperty::Unknown:
|
||||
+ SAL_INFO("xmlsecurity.helper", "Unknown property in ds:Object ignored");
|
||||
+ break;
|
||||
+ case SignatureProperty::Date:
|
||||
+ m_rParser.m_pXSecController->setDate(m_Id, m_Value);
|
||||
+ break;
|
||||
+ case SignatureProperty::Description:
|
||||
+ m_rParser.m_pXSecController->setDescription(m_Id, m_Value);
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1186,11 +1183,13 @@ class XSecParser::DsSignaturePropertyContext
|
||||
{
|
||||
if (nNamespace == XML_NAMESPACE_DC && rName == "date")
|
||||
{
|
||||
- return std::make_unique<DcDateContext>(m_rParser, std::move(pOldNamespaceMap));
|
||||
+ m_Property = SignatureProperty::Date;
|
||||
+ return std::make_unique<DcDateContext>(m_rParser, std::move(pOldNamespaceMap), m_Value);
|
||||
}
|
||||
if (nNamespace == XML_NAMESPACE_DC && rName == "description")
|
||||
{
|
||||
- return std::make_unique<DcDescriptionContext>(m_rParser, std::move(pOldNamespaceMap));
|
||||
+ m_Property = SignatureProperty::Description;
|
||||
+ return std::make_unique<DcDescriptionContext>(m_rParser, std::move(pOldNamespaceMap), m_Value);
|
||||
}
|
||||
return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
|
||||
}
|
||||
diff --git a/xmlsecurity/source/helper/xsecparser.hxx b/xmlsecurity/source/helper/xsecparser.hxx
|
||||
index 93efcb766e3e..7a0eb08bca28 100644
|
||||
--- a/xmlsecurity/source/helper/xsecparser.hxx
|
||||
+++ b/xmlsecurity/source/helper/xsecparser.hxx
|
||||
@@ -97,12 +97,6 @@ private:
|
||||
class DsSignatureContext;
|
||||
class DsigSignaturesContext;
|
||||
|
||||
- /*
|
||||
- * the following members are used to reserve the signature information,
|
||||
- * including X509IssuerName, X509SerialNumber, and X509Certificate,etc.
|
||||
- */
|
||||
- OUString m_ouDate;
|
||||
-
|
||||
std::stack<std::unique_ptr<Context>> m_ContextStack;
|
||||
std::unique_ptr<SvXMLNamespaceMap> m_pNamespaceMap;
|
||||
|
||||
diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx
|
||||
index 4d1b89949feb..5ed23281f083 100644
|
||||
--- a/xmlsecurity/source/helper/xsecsign.cxx
|
||||
+++ b/xmlsecurity/source/helper/xsecsign.cxx
|
||||
@@ -132,8 +132,8 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
|
||||
if (nStorageFormat != embed::StorageFormats::OFOPXML)
|
||||
{
|
||||
internalSignatureInfor.signatureInfor.ouSignatureId = createId();
|
||||
- internalSignatureInfor.signatureInfor.ouPropertyId = createId();
|
||||
- internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, digestID, internalSignatureInfor.signatureInfor.ouPropertyId, -1, OUString() );
|
||||
+ internalSignatureInfor.signatureInfor.ouDateTimePropertyId = createId();
|
||||
+ internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, digestID, internalSignatureInfor.signatureInfor.ouDateTimePropertyId, -1, OUString() );
|
||||
size++;
|
||||
|
||||
if (bXAdESCompliantIfODF)
|
||||
diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx
|
||||
index 1f7fa9ac8ca8..5f5840334254 100644
|
||||
--- a/xmlsecurity/source/helper/xsecverify.cxx
|
||||
+++ b/xmlsecurity/source/helper/xsecverify.cxx
|
||||
@@ -321,7 +321,7 @@ void XSecController::setGpgOwner( OUString const & ouGpgOwner )
|
||||
isi.signatureInfor.ouGpgOwner = ouGpgOwner;
|
||||
}
|
||||
|
||||
-void XSecController::setDate( OUString const & ouDate )
|
||||
+void XSecController::setDate(OUString const& rId, OUString const& ouDate)
|
||||
{
|
||||
if (m_vInternalSignatureInformations.empty())
|
||||
{
|
||||
@@ -329,17 +329,31 @@ void XSecController::setDate( OUString const & ouDate )
|
||||
return;
|
||||
}
|
||||
InternalSignatureInformation &isi = m_vInternalSignatureInformations.back();
|
||||
+ // there may be multiple timestamps in a signature - check them for consistency
|
||||
+ if (!isi.signatureInfor.ouDateTime.isEmpty()
|
||||
+ && isi.signatureInfor.ouDateTime != ouDate)
|
||||
+ {
|
||||
+ isi.signatureInfor.hasInconsistentSigningTime = true;
|
||||
+ }
|
||||
(void)utl::ISO8601parseDateTime( ouDate, isi.signatureInfor.stDateTime);
|
||||
isi.signatureInfor.ouDateTime = ouDate;
|
||||
+ if (!rId.isEmpty())
|
||||
+ {
|
||||
+ isi.signatureInfor.ouDateTimePropertyId = rId;
|
||||
+ }
|
||||
}
|
||||
|
||||
-void XSecController::setDescription(const OUString& rDescription)
|
||||
+void XSecController::setDescription(OUString const& rId, OUString const& rDescription)
|
||||
{
|
||||
if (m_vInternalSignatureInformations.empty())
|
||||
return;
|
||||
|
||||
InternalSignatureInformation& rInformation = m_vInternalSignatureInformations.back();
|
||||
rInformation.signatureInfor.ouDescription = rDescription;
|
||||
+ if (!rId.isEmpty())
|
||||
+ {
|
||||
+ rInformation.signatureInfor.ouDescriptionPropertyId = rId;
|
||||
+ }
|
||||
}
|
||||
|
||||
void XSecController::setSignatureBytes(const uno::Sequence<sal_Int8>& rBytes)
|
||||
@@ -433,27 +447,6 @@ void XSecController::setId( OUString const & ouId )
|
||||
isi.signatureInfor.ouSignatureId = ouId;
|
||||
}
|
||||
|
||||
-void XSecController::setPropertyId( OUString const & ouPropertyId )
|
||||
-{
|
||||
- if (m_vInternalSignatureInformations.empty())
|
||||
- {
|
||||
- SAL_INFO("xmlsecurity.helper","XSecController::setPropertyId: no signature");
|
||||
- return;
|
||||
- }
|
||||
- InternalSignatureInformation &isi = m_vInternalSignatureInformations.back();
|
||||
-
|
||||
- if (isi.signatureInfor.ouPropertyId.isEmpty())
|
||||
- {
|
||||
- // <SignatureProperty> ID attribute is for the date.
|
||||
- isi.signatureInfor.ouPropertyId = ouPropertyId;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- // <SignatureProperty> ID attribute is for the description.
|
||||
- isi.signatureInfor.ouDescriptionPropertyId = ouPropertyId;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
/* public: for signature verify */
|
||||
void XSecController::collectToVerify( const OUString& referenceId )
|
||||
{
|
||||
--
|
||||
2.32.0
|
||||
|
2120
SOURCES/0005-CVE-2021-25633.patch
Normal file
2120
SOURCES/0005-CVE-2021-25633.patch
Normal file
File diff suppressed because it is too large
Load Diff
1670
SOURCES/0006-xmlsecurity-replace-OOXMLSecParser-implementation.patch
Normal file
1670
SOURCES/0006-xmlsecurity-replace-OOXMLSecParser-implementation.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -55,7 +55,7 @@ Summary: Free Software Productivity Suite
|
||||
Name: libreoffice
|
||||
Epoch: 1
|
||||
Version: %{libo_version}.2
|
||||
Release: 5%{?libo_prerelease}%{?dist}
|
||||
Release: 10%{?libo_prerelease}%{?dist}
|
||||
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and MPLv2.0 and CC0
|
||||
URL: http://www.libreoffice.org/
|
||||
|
||||
@ -268,6 +268,18 @@ Patch23: 0006-tdf-137897-scRetypePassInputDlg-re-allow-password-re.patch
|
||||
Patch24: 0007-tdf-137982-m_xFrame-is-already-disposed.patch
|
||||
Patch25: 0008-Resolves-tdf-137215-restore-original-modality-before.patch
|
||||
Patch26: 0001-rhbz-1882616-move-cursor-one-step-at-a-time-in-the-d.patch
|
||||
Patch27: 0001-rhbz-1980800-allow-convert-to-csv-to-write-each-shee.patch
|
||||
Patch28: 0001-Resolves-tdf-132739-two-style-tags-where-there-shoul.patch
|
||||
Patch29: 0001-backports-to-ease-CVE-backporting.patch
|
||||
Patch30: 0002-CVE-2021-25635.patch
|
||||
Patch31: 0003-xmlsecurity-replace-XSecParser-implementation.patch
|
||||
Patch32: 0004-CVE-2021-25634.patch
|
||||
Patch33: 0005-CVE-2021-25633.patch
|
||||
Patch34: 0006-xmlsecurity-replace-OOXMLSecParser-implementation.patch
|
||||
Patch35: 0001-Correctly-read-PNG-into-bitmaps-N32BitTcA.-formats-w.patch
|
||||
Patch36: 0001-Read-MOSDocumentLockFile-UTF-16-string-data-with-sam.patch
|
||||
Patch37: 0001-Convert-attribute-value-to-UTF-8-when-passing-it-to-.patch
|
||||
Patch38: 0001-Fix-endianness-issues-in-OOX-crypto-routines.patch
|
||||
|
||||
%if 0%{?rhel}
|
||||
# not upstreamed
|
||||
@ -317,7 +329,9 @@ Summary: Core modules for LibreOffice
|
||||
Requires: %{name}-%{fontname}-fonts = %{epoch}:%{version}-%{release}
|
||||
Requires: %{name}-ure%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
Requires: %{name}-data = %{epoch}:%{version}-%{release}
|
||||
%ifnarch s390 s390x aarch64
|
||||
Requires: %{name}-plugin%{?_isa} = %{epoch}:%{version}-%{release}
|
||||
%endif
|
||||
Requires: liberation-sans-fonts, liberation-serif-fonts, liberation-mono-fonts
|
||||
Requires: dejavu-sans-fonts, dejavu-serif-fonts, dejavu-sans-mono-fonts
|
||||
Requires: google-crosextra-caladea-fonts, google-crosextra-carlito-fonts
|
||||
@ -1009,6 +1023,11 @@ sed -i -e /CppunitTest_sw_uiwriter/d sw/Module_sw.mk
|
||||
sed -i -e /CppunitTest_sc_subsequent_filters_test/d sc/Module_sc.mk
|
||||
%endif
|
||||
sed -i -e /CppunitTest_sal_osl/d sal/Module_sal.mk
|
||||
%ifarch s390x
|
||||
sed -i -e /CppunitTest_dbaccess_hsqlbinary_import/d dbaccess/Module_dbaccess.mk
|
||||
sed -i -e /CppunitTest_vcl_svm_test/d vcl/Module_vcl.mk
|
||||
sed -i -e /CustomTarget_uno_test/d testtools/Module_testtools.mk
|
||||
%endif
|
||||
|
||||
git commit -q -a -m 'temporarily disable failing tests'
|
||||
|
||||
@ -1326,7 +1345,12 @@ for file in *.desktop; do
|
||||
$file
|
||||
done
|
||||
# rhbz#186515 do not show startcenter
|
||||
sed -i -e /NoDisplay/s/false/true/ startcenter.desktop
|
||||
desktop-file-edit --set-key=NoDisplay --set-value=true startcenter.desktop
|
||||
%ifarch s390 s390x aarch64
|
||||
for app in base calc draw impress math startcenter writer xsltfilter; do
|
||||
desktop-file-edit --set-key=NoDisplay --set-value=true $app.desktop
|
||||
done
|
||||
%endif
|
||||
# relocate the .desktop and icon files
|
||||
install -m 0755 -d %{buildroot}%{_datadir}/applications
|
||||
for app in base calc draw impress math startcenter writer xsltfilter; do
|
||||
@ -1488,8 +1512,8 @@ for jar in %{buildroot}%{baseinstdir}/program/classes/*.jar; do
|
||||
done
|
||||
|
||||
%check
|
||||
%ifnarch ppc64 s390x aarch64 armv7hl
|
||||
make
|
||||
%ifnarch ppc64 aarch64 armv7hl
|
||||
make unitcheck slowcheck
|
||||
# we don't need this anymore
|
||||
rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar
|
||||
%endif
|
||||
@ -2241,9 +2265,29 @@ done
|
||||
%{_includedir}/LibreOfficeKit
|
||||
|
||||
%changelog
|
||||
* Sun Apr 11 2021 Andrew Lukoshko <alukoshko@almalinux.org> - 1:6.4.7.2-5.alma
|
||||
* Tue May 10 2022 Andrew Lukoshko <alukoshko@almalinux.org> - 1:6.4.7.2-10.alma
|
||||
- Debrand About window and palette
|
||||
|
||||
* Mon Feb 07 2022 Caolán McNamara <caolanm@redhat.com> - 1:6.4.7.2-10
|
||||
- Related: rhbz#2029810 bump n-v-r
|
||||
|
||||
* Mon Jan 31 2022 Caolán McNamara <caolanm@redhat.com> - 1:6.4.7.2-9
|
||||
- Related: rhbz#2029810 set NoDisplay=true for .desktop on s390x/aarch64
|
||||
- Related: rhbz#2029810 don't Require any vclplug for s390x/aarch64
|
||||
|
||||
* Tue Dec 07 2021 Caolán McNamara <caolanm@redhat.com> - 1:6.4.7.2-8
|
||||
- Resolves: rhbz#2029810 enable make check on s390x
|
||||
|
||||
* Fri Oct 15 2021 Caolán McNamara <caolanm@redhat.com> - 1:6.4.7.2-7
|
||||
- Resolves: rhbz#2013858 CVE-2021-25633
|
||||
- Resolves: rhbz#2014215 CVE-2021-25634
|
||||
- Resolves: rhbz#2014209 CVE-2021-25635
|
||||
|
||||
* Mon Sep 06 2021 Caolán McNamara <caolanm@redhat.com> - 1:6.4.7.2-6
|
||||
- Resolves: rhbz#1980800 allow convert to csv to write each sheet to
|
||||
separate file
|
||||
- Resolves: rhbz#1992695 two style tags where there should be one
|
||||
|
||||
* Wed Feb 03 2021 Caolán McNamara <caolanm@redhat.com> - 1:6.4.7.2-5
|
||||
- Resolves: rhbz#1924619 bad insertion of emoji
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user