]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Maintenance: Start following Inclusive Naming Initiative advice (#786)
authoruhliarik <luhliari@redhat.com>
Sun, 28 Mar 2021 05:35:22 +0000 (05:35 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Fri, 2 Apr 2021 23:24:23 +0000 (12:24 +1300)
... 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
doc/release-notes/release-3.5.sgml
src/Notes.cc
src/Notes.h
src/cf.data.pre
src/servers/FtpServer.cc

index 801cba7edb913df89a026e0af7ba7f31dc641c94..a89b98475ffdcdd25dd5412ec9493f2e2a5be3b2 100644 (file)
@@ -204,7 +204,7 @@ There have been changes to Squid's configuration file since Squid-3.3.
 <p>Squid supports reading configuration option parameters from external
    files using the syntax <em>parameters("/path/filename")</em>. For example:
 <verb>
-    acl whitelist dstdomain parameters("/etc/squid/whitelist.txt")
+    acl allowlist dstdomain parameters("/etc/squid/allowlist.txt")
 </verb>
 
 <p>There have also been changes to individual directives in the config file.
index 5be42e5fd3501d6200832ae3442bb7ceceed3096..14e217a46ff776838e62769a607fdd6a63d10460 100644 (file)
@@ -245,7 +245,7 @@ Most user-facing changes are reflected in squid.conf (see below).
 
 <p>Squid can be configured by adding an <em>http_port</em>
    with the <em>require-proxy-header</em> mode flag. The <em>proxy_protocol_access</em>
-   must also be configured with <em>src</em> ACLs to whitelist proxies which are
+   must also be configured with <em>src</em> ACLs to permit proxies which are
    trusted to send correct client details.
 
 <p>Forward-proxy traffic from a client proxy:
@@ -310,7 +310,7 @@ There have been changes to Squid's configuration file since Squid-3.4.
 <p>Squid supports reading configuration option parameters from external
    files using the syntax <em>parameters("/path/filename")</em>. For example:
 <verb>
-    acl whitelist dstdomain parameters("/etc/squid/whitelist.txt")
+    acl allowlist dstdomain parameters("/etc/squid/allowlist.txt")
 </verb>
 
 <p>The squid.conf macro <em>${service_name}</em> is added to provide the service name
index b7f55f7a900eb4d1a9867754cee2d71db601686d..ea208ba8b26ae1f02834295aae993e9d512bfefd 100644 (file)
@@ -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().
index 43ff55461232a5eccc44f8f79c5bd9d8dc71ceb3..018557781a11038d69a5367841553c9d3a983d1e 100644 (file)
@@ -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
 };
 
 /**
index 541cca791d4efc2139b154427f357c74cead278a..885e6c52e2904cfe36b96e38ac0eedb4b5f7b48d 100644 (file)
@@ -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
index 9b017bf74a092efce8aa7a5951fc02ae7d3fc872..e80cd5dd2eb13bfbad42f3d7d7573a46499f9646 100644 (file)
@@ -1834,16 +1834,16 @@ void Ftp::Server::completeDataDownload()
 static bool
 Ftp::SupportedCommand(const SBuf &name)
 {
-    static std::set<SBuf> BlackList;
-    if (BlackList.empty()) {
+    static std::set<SBuf> 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();
 }