diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-07-06 03:39:12 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-07-10 01:36:07 +0200 |
commit | abb6c01519a0318d7165dc9dc5b7d185353f93d6 (patch) | |
tree | 3b6fa1fc13fba77efc13ee3283c3e6c145bd4252 /comphelper/source | |
parent | 493ae7a6bb0c3ad50615db0090e7ae8d391bc327 (diff) |
replace usage of whitelist with allowlist
Background and motivation:
https://tools.ietf.org/html/draft-knodel-terminology-02
[API CHANGE] officecfg::Office::Common::Misc::OpenCLWhiteList -> OpenCLAllowList
Change-Id: I65636b19b13e4af1e4851f70e78053f3443d6bb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98181
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'comphelper/source')
-rw-r--r-- | comphelper/source/misc/lok.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx index 236f326be09b..8f26be08c49d 100644 --- a/comphelper/source/misc/lok.cxx +++ b/comphelper/source/misc/lok.cxx @@ -206,7 +206,7 @@ const LanguageTag& getLanguageTag() return rLanguage; } -bool isWhitelistedLanguage(const OUString& lang) +bool isAllowlistedLanguage(const OUString& lang) { if (!isActive()) return true; @@ -216,37 +216,37 @@ bool isWhitelistedLanguage(const OUString& lang) return true; #else static bool bInitialized = false; - static std::vector<OUString> aWhitelist; + static std::vector<OUString> aAllowlist; if (!bInitialized) { // coverity[tainted_data] - we trust the contents of this variable - const char* pWhitelist = getenv("LOK_WHITELIST_LANGUAGES"); - if (pWhitelist) + const char* pAllowlist = getenv("LOK_ALLOWLIST_LANGUAGES"); + if (pAllowlist) { - std::stringstream stream(pWhitelist); + std::stringstream stream(pAllowlist); std::string s; - std::cerr << "Whitelisted languages: "; + std::cerr << "Allowlisted languages: "; while (getline(stream, s, ' ')) { if (s.length() == 0) continue; std::cerr << s << " "; - aWhitelist.emplace_back(OStringToOUString(s.c_str(), RTL_TEXTENCODING_UTF8)); + aAllowlist.emplace_back(OStringToOUString(s.c_str(), RTL_TEXTENCODING_UTF8)); } std::cerr << std::endl; } - if (aWhitelist.empty()) - std::cerr << "No language whitelisted, turning off the language support." << std::endl; + if (aAllowlist.empty()) + std::cerr << "No language allowlisted, turning off the language support." << std::endl; bInitialized = true; } - if (aWhitelist.empty()) + if (aAllowlist.empty()) return false; - for (const auto& entry : aWhitelist) + for (const auto& entry : aAllowlist) { if (lang.startsWith(entry)) return true; |