From 70d0ef1898727cb94176238e754be9567693c401 Mon Sep 17 00:00:00 2001 From: uhliarik Date: Sun, 28 Mar 2021 05:35:22 +0000 Subject: [PATCH] Maintenance: Start following Inclusive Naming Initiative advice (#786) ... as detailed at https://inclusivenaming.org/ This change is limited to the words "whitelist" and "blacklist". Those two words are easier to replace with, arguably, better ones. No functionality changes. --- doc/release-notes/release-3.4.sgml | 2 +- doc/release-notes/release-3.5.sgml | 4 ++-- ...espell-whitelist.txt => codespell-ignorelist.txt} | 0 scripts/spell-check.sh | 10 +++++----- src/Notes.cc | 12 ++++++------ src/Notes.h | 8 ++++---- src/cf.data.pre | 4 ++-- src/servers/FtpServer.cc | 8 ++++---- 8 files changed, 24 insertions(+), 24 deletions(-) rename scripts/{codespell-whitelist.txt => codespell-ignorelist.txt} (100%) diff --git a/doc/release-notes/release-3.4.sgml b/doc/release-notes/release-3.4.sgml index 6360fa6dd5..446fc85cf9 100644 --- a/doc/release-notes/release-3.4.sgml +++ b/doc/release-notes/release-3.4.sgml @@ -204,7 +204,7 @@ There have been changes to Squid's configuration file since Squid-3.3.

Squid supports reading configuration option parameters from external files using the syntax parameters("/path/filename"). For example: - acl whitelist dstdomain parameters("/etc/squid/whitelist.txt") + acl allowlist dstdomain parameters("/etc/squid/allowlist.txt")

There have also been changes to individual directives in the config file. diff --git a/doc/release-notes/release-3.5.sgml b/doc/release-notes/release-3.5.sgml index 60033cb3d2..46517adb82 100644 --- a/doc/release-notes/release-3.5.sgml +++ b/doc/release-notes/release-3.5.sgml @@ -245,7 +245,7 @@ Most user-facing changes are reflected in squid.conf (see below).

Squid can be configured by adding an http_port with the require-proxy-header mode flag. The proxy_protocol_access - must also be configured with src ACLs to whitelist proxies which are + must also be configured with src ACLs to permit proxies which are trusted to send correct client details.

Forward-proxy traffic from a client proxy: @@ -310,7 +310,7 @@ There have been changes to Squid's configuration file since Squid-3.4.

Squid supports reading configuration option parameters from external files using the syntax parameters("/path/filename"). For example: - acl whitelist dstdomain parameters("/etc/squid/whitelist.txt") + acl allowlist dstdomain parameters("/etc/squid/allowlist.txt")

The squid.conf macro ${service_name} is added to provide the service name diff --git a/scripts/codespell-whitelist.txt b/scripts/codespell-ignorelist.txt similarity index 100% rename from scripts/codespell-whitelist.txt rename to scripts/codespell-ignorelist.txt diff --git a/scripts/spell-check.sh b/scripts/spell-check.sh index c313eb6201..c3fa76a305 100755 --- a/scripts/spell-check.sh +++ b/scripts/spell-check.sh @@ -16,7 +16,7 @@ # # By default, a hand-picked subset of Squid repository sources is fixed. # -# See ${WHITE_LIST} below for the list of allowed misspellings. +# See ${ALLOW_LIST} below for the list of allowed misspellings. # set -e @@ -33,9 +33,9 @@ if ! git diff --quiet; then exit 1 fi -WHITE_LIST=scripts/codespell-whitelist.txt -if test ! -f "${WHITE_LIST}"; then - echo "${WHITE_LIST} does not exist" +IGNORE_LIST=scripts/codespell-ignorelist.txt +if test ! -f "${IGNORE_LIST}"; then + echo "${IGNORE_LIST} does not exist" exit 1 fi @@ -62,7 +62,7 @@ for FILENAME in `git ls-files "$@"`; do *.sql|\ errors/templates/ERR_*|\ INSTALL|README|QUICKSTART) - if ! codespell -d -q 3 -w -I "${WHITE_LIST}" ${FILENAME}; then + if ! codespell -d -q 3 -w -I "${IGNORE_LIST}" ${FILENAME}; then echo "codespell failed for ${FILENAME}" exit 1 fi diff --git a/src/Notes.cc b/src/Notes.cc index 78b3b03f15..22d99abcf1 100644 --- a/src/Notes.cc +++ b/src/Notes.cc @@ -126,7 +126,7 @@ Note::toString(const char *sep) const } const Notes::Keys & -Notes::BlackList() +Notes::ReservedKeys() { // these keys are used for internal Squid-helper communication static const char *names[] = { @@ -147,12 +147,12 @@ Notes::BlackList() return keys; } -Notes::Notes(const char *aDescr, const Keys *extraBlacklist, bool allowFormatted): +Notes::Notes(const char *aDescr, const Keys *extraReservedKeys, bool allowFormatted): descr(aDescr), formattedValues(allowFormatted) { - if (extraBlacklist) - blacklist = *extraBlacklist; + if (extraReservedKeys) + reservedKeys = *extraReservedKeys; } Note::Pointer @@ -183,8 +183,8 @@ Notes::banReservedKey(const SBuf &key, const Keys &banned) const void Notes::validateKey(const SBuf &key) const { - banReservedKey(key, BlackList()); - banReservedKey(key, blacklist); + banReservedKey(key, ReservedKeys()); + banReservedKey(key, reservedKeys); // TODO: fix code duplication: the same set of specials is produced // by isKeyNameChar(). diff --git a/src/Notes.h b/src/Notes.h index 6920de270f..2043a9d0be 100644 --- a/src/Notes.h +++ b/src/Notes.h @@ -114,7 +114,7 @@ public: typedef NotesList::iterator iterator; ///< iterates over the notes list typedef NotesList::const_iterator const_iterator; ///< iterates over the notes list - explicit Notes(const char *aDescr, const Keys *extraBlacklist = nullptr, bool allowFormatted = true); + explicit Notes(const char *aDescr, const Keys *extraReservedKeys = nullptr, bool allowFormatted = true); Notes() = default; ~Notes() { notes.clear(); } Notes(const Notes&) = delete; @@ -146,7 +146,7 @@ private: /// Makes sure the given key is not on the given list of banned names. void banReservedKey(const SBuf &key, const Keys &banned) const; - /// Verifies that the key is not blacklisted (fatal error) and + /// Verifies that the key is not reserved (fatal error) and /// does not contain special characters (non-fatal error). void validateKey(const SBuf &key) const; @@ -160,10 +160,10 @@ private: NotesList notes; ///< The Note::Pointer objects array list const char *descr = nullptr; ///< identifies note source in error messages - Keys blacklist; ///< a list of additional prohibited key names + Keys reservedKeys; ///< a list of additional prohibited key names bool formattedValues = false; ///< whether to expand quoted logformat %codes - static const Notes::Keys &BlackList(); ///< always prohibited key names + static const Notes::Keys &ReservedKeys(); ///< always prohibited key names }; /** diff --git a/src/cf.data.pre b/src/cf.data.pre index 397170b0a5..cae249afad 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -84,7 +84,7 @@ COMMENT_START files using the syntax: parameters("/path/filename") For example: - acl whitelist dstdomain parameters("/etc/squid/whitelist.txt") + acl allowlist dstdomain parameters("/etc/squid/allowlist.txt") Conditional configuration @@ -2455,7 +2455,7 @@ DOC_START require-proxy-header Require PROXY protocol version 1 or 2 connections. - The proxy_protocol_access is required to whitelist + The proxy_protocol_access is required to permit downstream proxies which can be trusted. worker-queues diff --git a/src/servers/FtpServer.cc b/src/servers/FtpServer.cc index 549f1aac88..099102fffb 100644 --- a/src/servers/FtpServer.cc +++ b/src/servers/FtpServer.cc @@ -1834,16 +1834,16 @@ void Ftp::Server::completeDataDownload() static bool Ftp::SupportedCommand(const SBuf &name) { - static std::set BlackList; - if (BlackList.empty()) { + static std::set BlockList; + if (BlockList.empty()) { /* Add FTP commands that Squid cannot relay correctly. */ // We probably do not support AUTH TLS.* and AUTH SSL, // but let's disclaim all AUTH support to KISS, for now. - BlackList.insert(cmdAuth()); + BlockList.insert(cmdAuth()); } // we claim support for all commands that we do not know about - return BlackList.find(name) == BlackList.end(); + return BlockList.find(name) == BlockList.end(); } -- 2.47.2