Don't delete periods when validating username uniqueness (#11392)#11400
Merged
Gargron merged 5 commits intomastodon:masterfrom Jul 24, 2019
Merged
Don't delete periods when validating username uniqueness (#11392)#11400Gargron merged 5 commits intomastodon:masterfrom
Gargron merged 5 commits intomastodon:masterfrom
Conversation
added 5 commits
July 23, 2019 10:35
This makes sure that migration 20190715164535_add_instance_actor won't fail if there's already an account that is named the same as the domain (minus the .)
) The 20190715164535_add_instance_actor migration fails if there's already a username similar to the domain name, e.g. if you are 'vulpine.club' and have a user named 'vulpineclub', validation fails. Upon further review, usernames with periods are dropped by the regular expression in the Account class, so we don't need to worry about it here. Fixes mastodon#11392
Gargron
approved these changes
Jul 23, 2019
Member
|
Why haven't the checks run? |
Contributor
|
@Gargron no idea. Isn't there a way for you to force it to run again? |
Member
|
@ThibG No, the checks tab is just empty |
Contributor
|
Anyway, the tests pass, so it should be fine to merge |
Contributor
Author
|
I didn't break it, it was on fire when I got here :) |
hiyuki2578
pushed a commit
to ProjectMyosotis/mastodon
that referenced
this pull request
Oct 2, 2019
…1392) (mastodon#11400) * Check to make sure usernames with '.' cannot be created * Add test for instance actor account name conflicts This makes sure that migration 20190715164535_add_instance_actor won't fail if there's already an account that is named the same as the domain (minus the .) * Put the test into the correct context... * Add another test to split this into two validations * Don't delete periods when validating username uniqueness (mastodon#11392) The 20190715164535_add_instance_actor migration fails if there's already a username similar to the domain name, e.g. if you are 'vulpine.club' and have a user named 'vulpineclub', validation fails. Upon further review, usernames with periods are dropped by the regular expression in the Account class, so we don't need to worry about it here. Fixes mastodon#11392
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 20190715164535_add_instance_actor migration fails if there's already a username similar to the domain name, e.g. if you are 'vulpine.club' and have a user named 'vulpineclub', validation fails.
Upon further review, usernames with periods are dropped by the regular expression in the Account class, so we don't need to worry about it here.
Fixes #11392