Closed Xraydylan closed 1 year ago
It's caused by an internal function that cleans up the username to avoid non-allowed characters (it removes everything that isn't a-z\d.~-
). I didn't know ` was allowed, so the regex removes that too.
I'll add it to the list of allowed character and publish a patch :)
Fixed in v3.9.2 :)
Thanks that would be good.
Alternatively, I just looked into it a bit. Would be be possible to use the quote() function from urllib.parse to achive a more consitent result if future error occure? (For the "Basque`" -> "Basque%60" conversion of similar characters?)
Yeah I thought about using quote
, but I had already pushed the new version x3
I'll add it to the next patch :)
For what it's worth I tested it in my browsers and it worked without escaping the character. Modern browsers aren't that picky about escaping characters anymore, except for ?
and &
for query parameters.
Version
3.9.1
What happened?
I have been using the API for a little project of mine and encountered a problem with a certain username.
In their name ["Basque`"] they use the " ` " character. It gets encoded in the URL with %60. (Reference for URL encoding https://www.w3schools.com/tags/ref_urlencode.ASP)
The problme is I can't get this user with the API's user() method. It doesn't throuw an error but insteads retrieves the user named "basque" without the speical character.
How can this be adressed?
How to reproduce the bug?
Call:
And compare stats to user front page of path "/user/Basque%60".
Relevant log output
No response