ambiguous route for numerical handles
[unsure if this is a pleroma bug or a pleroma FE bug, so apologies if i'm posting this in the wrong place; i'm not really involved with this project.]
currently, if a user is created with a numerical handle (e.g. @123
), the /users/
routing interprets the link to this handle (/users/123
) as a user id, not a nickname, so clicking on @123@pleroma.site
shows the user with id 123, not the user with the handle @123
. certain clients do not replicate this issue.
possible solutions that come to mind:
- simply ban numerical handles. downsides: limits user expressiveness, not back-compatible
- split
/users/
into e.g./users/$handle
and/id/$userid
. - adopt mastodon-style routing for handles; retain auto-detection of alphanumeric handles at
/users/
for back-compat. this would also improve compatibility with mastodon in a small way, if one cares about such things. - split routing as in (2) or (3) but remove auto-detection to prevent confusion at the cost of broken links.
ofc none of these solutions address the issue of what happens when an older pleroma instance links to a /users/$handle
url for a numerically-handled account on another server; i doubt this can really be solved in a way that will cooperate well with older instances, since this would require somehow divining whether a url represents an id or a handle, which doesn't seem practicable. depending on how cross-server account links are implemented both currently and historically, there might be some dark magic you could pull to wallpaper over the glitch in certain cases by examining the Referrer
header but this seems massively unpleasant and would probably just make things worse in the long run.