-
-
Notifications
You must be signed in to change notification settings - Fork 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
Migration for PR #11321 fails to add instance.tld
if there is already an account named instancetld
#11392
Comments
I believe
Update: Confirmed... this fixed it:
Dunno if there are any side effects etc |
I really don't know why there would be a need to delete dots, since they're disallowed anyway. |
The idea is that someone could impersonate |
They could also impersonate |
I'll create a PR to nuke the |
That's a fantastic point actually and there's been a wave of phishing sign-ups recently that attempt to use similar looking letters and underscores to impersonate server admins. We can't do anything about the similar looking letters (or can we?) but if we applied the same rule for |
So hmm... if we want to keep this protection in place, then maybe the way to do that is to skip the (edit: and maybe add a (edit 2: new issue: i can't stop seeing |
We could probably define a mapping like |
Yes, this would be the correct solution in my opinion. |
Cool, I'll get that PR in today. IMO the broader lookalike-character/impersonation problem is likely its own project, and I'm not sure this is the place to fix it. |
@Gargron just checking the code, this validator is called under the exact same conditions as the regexp validator, which disallows dots (which cannot work with our username-based routes in Rails anyway), so this |
) 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
…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 (#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 #11392
…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
I'm not 100% sure this is what's doing it, but I think that if you have an account like
@vulpineclub@vulpine.club
,20190715164535_add_instance_actor.rb
failsExpected behaviour
rails db:migrate
should complete error-freeActual behaviour
Steps to reproduce the problem
.
(e.g.vulpineclub
forvulpine.club
20190715164535_add_instance_actor.rb
Specifications
Running glitch-soc at 6db5669
The text was updated successfully, but these errors were encountered: