rubygems / rubygems.org

The Ruby community's gem hosting service.
https://rubygems.org
MIT License
2.33k stars 924 forks source link

Profanities in gems #2132

Closed rubyFeedback closed 5 years ago

rubyFeedback commented 5 years ago

I am normally quite tolerant/liberal.

However had ... let me describe the situation as-is.

There has been some debate about chef recently. I am not going into that debate, but something else.

Someone published a fake gem:

https://rubygems.org/gems/chef-sugar-Fyou-sethvargo

If you then search for it via:

https://rubygems.org/search?utf8=%E2%9C%93&query=chef-sugar

You can see this:

"chef-sugar-Fyou-sethvargo 5.0.0

FUCK YOU Seth Vargo"

Hmm. I am not sure if code should be added to prevent this; I don't necessarily want to have to decide either.

But - I believe that there is one huge reason why this should NOT be allowed. Most rubygem users who search for something, would not expect profanities to appear. The gem is not doing anything useful either, so it is just drawing away resources from everyone.

Evidently this is quickly fixed manually, but I am thinking that perhaps there could be a loose checker for words that should not appear in a description, which may appear in a search?

Here of course we need to be careful to not want to censor words that are perfectly fine, but the gem here uses EVIDENTLY a "description" that just wants to attack someone else - and I think this is not useful for anyone really other than that person venting of steam.

How to solve this? Well.

The best would be if nobody would do this, but ok, that can not be changed.

The second best is probably to just replace the swear words, like with *.

This is not a perfect solution but may be trivial to add.

A slightly better solution may be to prevent uploading such gems altogether - but we have to be careful about false positives, in particular when there are words that may contina subparts (such as certain names in different languages; relevent xkcd https://imgs.xkcd.com/comics/exploits_of_a_mom.png)

There may be even better solutions in the long run, perhaps a better search-system for rubygems, but I understand that the latter may take much more time to implement - so perhaps just a simple solution may suffice. It is not a huge problem either.

(Note that I am aware that the above aren't great fixes; consider this to be more of a brainstorm section. Feel free to close this issue at any moment in time, for any reason.)

dwradcliffe commented 5 years ago

This gem has been removed. I don't think we're going to implement anything to prevent this automatically at this time, but thanks for your thoughts.