[openstreetmap/openstreetmap-website] Disallow username changes to user_n if n isn't their id (PR #4218)

Anton Khorev notifications at github.com
Sat Sep 2 12:18:20 UTC 2023


In case you don't want #4215, there's already a defacto url scheme with user ids: `/user/user_id`. That's what deleted accounts get reset to. But it has a couple of problems. "user_12345" is a valid username for anyone, not just the user with id=12345. Depending on how many usernames with this pattern already exist, we may want to stop allowing new ones.

I know one active user with this kind of name, but it matches their id.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/4218

-- Commit Summary --

  * Disallow username changes to user_n if n isn't their id

-- File Changes --

    M app/models/user.rb (7)
    M config/locales/en.yml (1)
    M test/models/user_test.rb (22)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/4218.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4218.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4218
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4218 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230902/7f1041a8/attachment.htm>


More information about the rails-dev mailing list