summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2020-07-06 03:01:51 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-07-10 01:34:54 +0200
commit493ae7a6bb0c3ad50615db0090e7ae8d391bc327 (patch)
tree9f60f522f1ff9dde6a8131d155654f4d47b37fd0 /xmlsecurity
parent005f5db47b8e1bbd7ebddee92009be072e835fd5 (diff)
replace usage of blacklist with denylist
.. and a few cases of instead doing blacklist->excludelist where that made more sense. Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 [API CHANGE] officecfg::Office::Canvas::DeviceBlacklist -> DeviceDenylist [API CHANGE] officecfg::Office::Canvas::BlacklistCurrentDevice -> DenylistCurrentDevice [API CHANGE] officecfg::Office::Common::Misc::OpenCLBlackList -> OpenCLDenyList Change-Id: Ia35e25496bf0cc0692d5de4cb66bfc232d3a869e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98180 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/helper/ooxmlsecexporter.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/xmlsecurity/source/helper/ooxmlsecexporter.cxx b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
index fe4d0df89a5d..a857665a0493 100644
--- a/xmlsecurity/source/helper/ooxmlsecexporter.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
@@ -54,9 +54,9 @@ public:
}
/// Should we intentionally not sign this stream?
- static bool isOOXMLBlacklist(const OUString& rStreamName);
+ static bool isOOXMLDenylist(const OUString& rStreamName);
/// Should we intentionally not sign this relation type?
- static bool isOOXMLRelationBlacklist(const OUString& rRelationName);
+ static bool isOOXMLRelationDenylist(const OUString& rRelationName);
const uno::Reference<xml::sax::XDocumentHandler>& getDocumentHandler() const
{
@@ -84,26 +84,26 @@ public:
void writeSignatureLineImages();
};
-bool OOXMLSecExporter::Impl::isOOXMLBlacklist(const OUString& rStreamName)
+bool OOXMLSecExporter::Impl::isOOXMLDenylist(const OUString& rStreamName)
{
- static const std::initializer_list<OUStringLiteral> vBlacklist
+ static const std::initializer_list<OUStringLiteral> vDenylist
= { "/%5BContent_Types%5D.xml", "/docProps/app.xml", "/docProps/core.xml",
// Don't attempt to sign other signatures for now.
"/_xmlsignatures" };
// Just check the prefix, as we don't care about the content type part of the stream name.
- return std::any_of(vBlacklist.begin(), vBlacklist.end(), [&](const OUStringLiteral& rLiteral) {
+ return std::any_of(vDenylist.begin(), vDenylist.end(), [&](const OUStringLiteral& rLiteral) {
return rStreamName.startsWith(rLiteral);
});
}
-bool OOXMLSecExporter::Impl::isOOXMLRelationBlacklist(const OUString& rRelationName)
+bool OOXMLSecExporter::Impl::isOOXMLRelationDenylist(const OUString& rRelationName)
{
- static const std::initializer_list<OUStringLiteral> vBlacklist = {
+ static const std::initializer_list<OUStringLiteral> vDenylist = {
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",
"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",
"http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin"
};
- return std::find(vBlacklist.begin(), vBlacklist.end(), rRelationName) != vBlacklist.end();
+ return std::find(vDenylist.begin(), vDenylist.end(), rRelationName) != vDenylist.end();
}
void OOXMLSecExporter::Impl::writeSignedInfo()
@@ -232,7 +232,7 @@ void OOXMLSecExporter::Impl::writeManifest()
{
if (rReference.nType != SignatureReferenceType::SAMEDOCUMENT)
{
- if (OOXMLSecExporter::Impl::isOOXMLBlacklist(rReference.ouURI))
+ if (OOXMLSecExporter::Impl::isOOXMLDenylist(rReference.ouURI))
continue;
writeManifestReference(rReference);
@@ -271,7 +271,7 @@ void OOXMLSecExporter::Impl::writeRelationshipTransform(const OUString& rURI)
aType = rPair.Second;
}
- if (OOXMLSecExporter::Impl::isOOXMLRelationBlacklist(aType))
+ if (OOXMLSecExporter::Impl::isOOXMLRelationDenylist(aType))
continue;
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());