Skip to content
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

Closed
dhh opened this issue Aug 21, 2018 · 11 comments
Closed

Replace use of whitelist with allowlist and blacklist with denylist #33677

dhh opened this issue Aug 21, 2018 · 11 comments
Milestone

Comments

@dhh
Copy link
Member

dhh commented Aug 21, 2018

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.

@shalvah
Copy link
Contributor

shalvah commented Aug 22, 2018

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.
I haven't met any black person (myself included) who was ever offended by the use of "blacklist". Frankly, a good number find it patronising to make this kind of change.

@ghost
Copy link

ghost commented Aug 22, 2018

At least one source from a search suggests the word had its origins around union members.

@dhh
Copy link
Member Author

dhh commented Aug 22, 2018

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.

@glaszig
Copy link
Contributor

glaszig commented Aug 22, 2018

  1. etymology is quite important. in the end, we might consider plain words „black“ and „white“ racist and enter the realms of newspeak which i figure you especially, @dhh, are familiar with.

  2. “allow/deny are simply clearer terms” — now that’s an actual, technically useful argument.

  3. can we please stop jumping onto political bandwagons? i am here for the sanity.

@Alamoz
Copy link

Alamoz commented Aug 22, 2018

The terms Blocklist and Clearlist are sometimes used in place of Blacklist and Whitelist.

@minaslater
Copy link
Contributor

minaslater commented Aug 22, 2018

I'm gonna go ahead and get started on this... 😄

@cbarton
Copy link

cbarton commented Aug 22, 2018

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...

@justizin
Copy link

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. :) 💯

ssaunier added a commit to ssaunier/github_webhook that referenced this issue Aug 22, 2018
@cbarton
Copy link

cbarton commented Aug 22, 2018

@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 blacklist has far more far reaching disciplines than just comp-sci.

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.

@9jaswag
Copy link

9jaswag commented Aug 22, 2018

I think the question here should be: is replacing whitelist and blacklist with allowlist and denylist a better option? If presented with the word blacklist and denylist, which is most likely self-explanatory as to the action to be performed?

@rails rails deleted a comment from tomhoad Aug 22, 2018
@rails rails deleted a comment from huysentruitw Aug 22, 2018
@rails rails locked as too heated and limited conversation to collaborators Aug 22, 2018
@rafaelfranca
Copy link
Member

A quick search and replace in the codebase shows that all entries for those words were already changed. I'll close this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants