Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Server error on special characters #737

Open
dFoiler opened this issue Nov 6, 2021 · 2 comments
Open

Server error on special characters #737

dFoiler opened this issue Nov 6, 2021 · 2 comments
Assignees

Comments

@dFoiler
Copy link

dFoiler commented Nov 6, 2021

I was trying to register an account earlier today, and the first-time registration page kept throwing Server Error (500) until I changed my password to exclude special characters (such as "Ÿ" and similar). It might be worth adding support for unicode or saying explicitly on the registration page to use non-unicode characters.

@kinn-edendev
Copy link

Looks like an issue with the Django forms that the site uses to register new users.

https://stackoverflow.com/questions/34236955/how-to-custom-django-form-label-that-contains-unicode

According to this stackoverflow thread, it could have to do with the encoding of ocfweb's python files being us-ascii which only uses a subset of UTF-8 instead of the entire UTF-8, including special characters such as the above and emojis (!).
Switching entirely to UTF-8 could be a broader solution, but in general I would like to look into other encodings before settling.

Additionally, it could be an issue with the django database, but my research on this repo fell short as I couldn't find details about the database in my short amount of time searching. If anyone has information, drop a reply.

https://cmljnelson.blog/2018/08/27/adding-support-for-foreign-characters-to-django/

If ocfweb does use a django database for auth (though I suspect an LDAP service is used), the solution on the blog post above may provide an answer.

Also happy to provide steps to convert python files or make a script to convert us-ascii -> UTF-8 if necessary, or if this problem is still relevant next time someone looks at this.

@kinn-edendev
Copy link

As an alternative, I can also look at specifying on the registration page that only latin characters a-zA-Z and any additional characters such as numbers or special characters can be used. If you're reading this and I haven't done this please ping me.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants