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

Critical: Emojis should not be valid Org or Project names #1224

Closed
amplifi opened this issue Mar 7, 2017 · 3 comments · Fixed by #1395
Closed

Critical: Emojis should not be valid Org or Project names #1224

amplifi opened this issue Mar 7, 2017 · 3 comments · Fixed by #1395

Comments

@amplifi
Copy link
Contributor

amplifi commented Mar 7, 2017

Steps to reproduce the error

DO NOT test this in any live environment (staging, demo, or production). Test in dev VM only!!

This bug breaks the platform and results in data corruption.

Create a new org, project, whatever and give it an emoji for a name. Click Save.

Actual behavior

Emoji is saved as the entity's name, and the platform dies in a fire trying to display it.

Expected behavior

Don't allow emoji to be accepted by an input field on the platform. (Related but separate to #1157 )

@oliverroick
Copy link
Member

I had a look at this and the problem was not so much the use of emojis per se but rather that the name contained only emojis. That resulted in an empty slug which broke the platform. If you have a name like "I need 🍺" everything is ok because the resulting slug is i-need.

We can make emoji-only names for organizations and projects work, if we use a default slug whenever slugifying a name results in an empty slug. I have a solution ready that uses the model name, so if the organization's or project's name is just "🍺🍺🍺🍺" the resulting slug would be organization or project, respectively.

screen shot 2017-03-09 at 14 28 43

The question is: Do we want to allow emojis at all? My take is, why not? And if yes, is the proposed solution using the model name acceptable?

If we decide not to allow emojis the solution is more complex and will be folded together with #1157.

@amplifi
Copy link
Contributor Author

amplifi commented Mar 9, 2017

The empty slug broke the platform, but the emoji char also caused breaks in ElasticSearch. If we're going to support emoji we'll need to make sure it's supported throughout; ES, imports, exports, ODK, etc.

@linzjax
Copy link
Contributor

linzjax commented Mar 9, 2017

I've been using emoji's when testing ODK on my local-env and they translated to the platform without any complaints, but that was before we had ES.

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

Successfully merging a pull request may close this issue.

4 participants