Non-UTF8 user nicknames crash API request #1055
Labels
No labels
approved, awaiting change
broken setup
bug
cannot reproduce
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs change/feedback
needs docs
needs tests
not a bug
not our bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AkkomaGang/akkoma#1055
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Your setup
From source
Extra details
Alpine 3.23
Version
basically
816d2332aPostgreSQL version
18
What’s wrong?
We previously got a report about such crashes inside the flake library in https://meta.akkoma.dev/t/frontend-unicodeconversionerror/847 and fixed this via
936be4edbb.However, it seems this can still crash a bit later inside the db query since postgres expects the
textfield to be valid UTF-8 too:(notably this is the exact same request path as originally reported in the forum)
Making non-UTF8 names work would require changing the thype of the nickname to be an arbitrary binary, but I don’t think this is desirable. Instead just making it gracefully 404 would be good.
This affects all endpoints accepting nicknames, but also only if they are actually used with nicknames (as akkoma-fe does, accepting nicknames in addition to IDs in several endpoints is a Pleroma extension). Likely not causing much actual issues in practice though since all existing users the frontend might proactively fetch on its own are guaranteed to have valid UTF-8 names
Severity
I can manage
Have you searched for this issue?
Non-UTF8 usernames crash connection processto Non-UTF8 user nicknames crash API request