Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
P
pleroma-meta
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 37
    • Issues 37
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards
  • Pleroma
  • pleroma-meta
  • Issues
  • #22

Closed
Open
Opened Dec 23, 2019 by rinpatch@rinpatchMaintainer0 of 5 tasks completed0/5 tasks
  • Report abuse
  • New issue
Report abuse New issue

Stop accepting nicknames or ids in /api/v1/accounts/:id

Although this is less of a problem on instances with flake ids, older instances have cases where there is both a user with nickname being equal to the requested string and an id being equal to the requested string, resulting in a wrong account being displayed at the url (For example you would expect https://kawen.space/314 to display @314@kawen.space, but it displays @TheKinrar@mastodon.xyz instead). I propose fixing this by stopping to accept nicknames in /api/v1/accounts/:id and making a separate endpoint for requesting a user by their nickname /api/v1/accounts_by_nickname/:nickname.

Things needed:

  • Implement /api/v1/accounts_by_nickname/:nickname
  • Advertise https://instance.social/:nickname in the url property of actors, this will make the external links lead to it.
  • Make the FE use only /api/v1/accounts_by_nickname/:nickname when resolving a user at /:nickname
  • Make the FE use a different route for remote users that are addressed by id (i.e /accounts/) . The problem with changing /users/ to be id-only is that our AP ids are /users/:nickname, so visiting an AP id in-browser will not work, which is undesirable because some implementations don't honor url.
  • Remove nickname support from /api/v1/accounts/:id

cc @lambadalambda @lanodan @hj @shpuld

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: pleroma/pleroma-meta#22