-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace use of whitelist with allowlist and blacklist with denylist #33677
Comments
Good intentions, but I doubt there's any relation of the origin of the terms blacklist/whitelist to race. There are many idioms and phrases in the English language that make use of colours without any racial backstories. |
At least one source from a search suggests the word had its origins around union members. |
Regardless of origin, allow/deny are simply clearer terms that does not require tracing the history of black/white as representations of that meaning. We can simply use the meaning directly. |
|
The terms Blocklist and Clearlist are sometimes used in place of Blacklist and Whitelist. |
I'm gonna go ahead and get started on this... 😄 |
One could also argue that in color theory, black is the absence of color (photons which make up the spectrum) and white is the accumulation of all colors. Thus a blacklist is a list which contains elements that are to be absent and a whitelist to be allowed... |
I think this is a great idea, I have proposed internally at multiple companies I've worked at changing master/slave and blacklist/whitelist to leader/replica and allowlist/denylist, if only because in an industry with poor representation it feels incredibly overt to be standing in a room full of mostly white people using these terms outloud. It doesn't matter what the origin or intent of this was, or whether people can find a narrow lens through which to see it as not a problem. Consider using these terms in a coding or systems interview with someone you have just met. I understand that some black people may not consider these terms offensive, but I would rather someone not want to work with me because they think I am too politically correct than because they think I am too insensitive and blind. @minaslater thanks for beating me to the first PR on this. :) 💯 |
@bitmonk I respectfully disagree with your opinion that your (or my) future colleagues would impose that kind of cultural bias on words that exist in the English language as well as are well-defined on Wikipedia, of which That said and since I think this issue will garner overwhelming support in this community, I do support a compromise suggested by @rafaelfranca's review to replace the actual words with their definition or some other phrase that is more fluid than a single term. |
I think the question here should be: is replacing |
A quick search and replace in the codebase shows that all entries for those words were already changed. I'll close this issue. |
Per https://twitter.com/dhh/status/1032050325513940992, I'd like for Rails to set a good example and tone by using better terminology when we can. An easy fix would be to replace our use of whitelist with allowlist and blacklist with denylist.
We can even just use them as verbs directly, as we do with the former terms. So something is allowlisted or denylisted.
I took a quick look and it seems like this change is mostly about docs. We only have one piece of the code that I could find on a search that uses the term whitelist with
enforce_raw_sql_whitelist
. Need to consider whether we need an alias and a deprecation for that.The text was updated successfully, but these errors were encountered: