-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Fix username rendering bug #2122
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs migration to unsanitize already broken user full names
Integration test for this would be nice |
@lafriks No migrations, |
@bkcsoft True, but I also made changes to @lafriks It's not always possible to reconstruct an unsanitized string from a sanitized one. For instance, if a sanitized full name is "a & b", the unsanitized version could be "a & b" or "a & b". Additionally, we don't currently have a function unsanitizing, and IMO writing one seems like more trouble than it would be worth. I'm guessing only a small number of actual users have been affected by this, and they can just changes their names manually. |
@ethantkoenig if it's sanitized |
@bkcsoft Both |
Even if |
For migration golangs built in |
@lafriks Migration added |
LGTM |
LGTM |
Fixes #1629.
Don't sanitize user's full names in the database. Since
user.FullName
anduser.DisplayName()
are strings, they are automatically already sanitized by the templating engine. If we sanitize the values stored in the database, users' full name end up being up sanitized twice.I'm planning to add an integration test soon.Added an integration test