[openstreetmap/openstreetmap-website] User's should not be allowed to have invisible names (Issue #6642)
Andy Allan
notifications at github.com
Tue Sep 15 11:21:36 UTC 2026
gravitystorm left a comment (openstreetmap/openstreetmap-website#6642)
> Should we maybe require zero-width characters to not be a part of usernames at all (rather than requiring the total glyph length > 0)?
We should be very cautious about prohibiting zero-width characters completely. They are used in a variety of scripts (e.g. Persian, Sinhala, Marathi, Khmer) to generate correct rendering. See for example [U+200C (ZWNJ)](https://en.wikipedia.org/wiki/Zero-width_non-joiner), [U+200D (ZWJ)](https://en.wikipedia.org/wiki/Zero-width_joiner) and [U+200B (ZWSP)](https://en.wikipedia.org/wiki/Zero-width_space).
When I last looked into this, I ended up down a very deep rabbit hole trying to build a list of all the "renders like a space" characters in Unicode, of which there are dozens and most do not appear in regexp ":space" character lists.
Tom [mentions checking the final width](https://github.com/openstreetmap/openstreetmap-website/issues/6642#issuecomment-3681691598) and I would go slightly further, since I think we want three or more characters, each of width 1 or more - not e.g. 2 x width-2 or width-2 + width-1.
We can also do more to detect homoglyphs and hopefully as part of that it would flush out the "sneaky" (as opposed to useful) zero-width characters.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6642#issuecomment-5679335705
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/6642/5679335705 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260915/e9e99417/attachment.htm>
More information about the rails-dev
mailing list