Remove usage of "whitelist", use better terms instead

Created on 31 May 2021, over 3 years ago
Updated 12 April 2023, almost 2 years ago

Problem/Motivation

As is being done in Drupal core and other modules, let's replace instances of "blacklist" and "whitelist," which were historically the conventionally accepted terms used in programming to describe a list of disallowed items and a list of allowed items, and were used in this module to follow that convention. However, they:

  • are derived from now-anachronistic labels from a historical era that demeaned people purely because of skin color; and,
  • provide no context/clear meaning ("what goes in these lists" / "what's the purpose of each list") -- new labels could clearly convey the meaning/purpose of each list.

(See for more background info and links to learn more.)

More info:
https://mobile.twitter.com/s_bergmann/status/1269917026107248641
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6148600

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Miscellaneous

Created by

πŸ‡§πŸ‡·Brazil guilhermevp Santa Rita do Passa Quatro - SP

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson
  • Issue was unassigned.
  • Status changed to Needs review almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    The attached patch updates to use the key scheme_allow_list and provides a database update for existing sites. Confirmation that the update does what it should:

    Before

    scheme_whitelist:
      - http
      - https
      - files
      - internal
    protocol_style: full
    local_paths: ''
    

    Demonstration of successful execution

     ------------ ----------- --------------- ---------------------------------- 
      Module       Update ID   Type            Description                       
     ------------ ----------- --------------- ---------------------------------- 
      pathologic   8101        hook_update_n   8101 - Move existing setting for  
                                               allowed schema to new name        
                                               (#3216612).                       
     ------------ ----------- --------------- ---------------------------------- 
     
      Do you wish to run the specified pending updates? (yes/no) [yes]:
     > yes
    
    >  [notice] Update started: pathologic_update_8101
    >  [notice] Update completed: pathologic_update_8101
     [success] Finished performing updates.
    

    After

    scheme_allow_list:
      - http
      - https
      - files
      - internal
    protocol_style: full
    local_paths: ''
    
    • dww β†’ committed 3b9701e4 on 2.0.x
      Issue #3216612 by guilhermevp, dww, mark_fullmer: Remove usage of "...
    • dww β†’ committed bf1764a9 on 8.x-1.x
      Issue #3216612 by guilhermevp, dww, mark_fullmer: Remove usage of "...
  • Status changed to Fixed almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States dww

    Fantastic, thanks! I moved this from a hook_update_N() (which is only really needed when changing the DB schema) to a hook_post_update(). Among other benefits, that avoids the yucky problem of picking a good value of N for this. πŸ˜… Tested locally and confirmed the post_update is working. Tests are passing locally (although there's no test coverage of this setting). Committed to 2.0.x, cherry-picked to 8.x-1.x and pushed.

    Onwards!
    -Derek

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024