[Bug] Malformed HTTP requests causing 404 errors #181

Closed
opened 5 months ago by solidsanek · 11 comments

Steps to reproduce:

  1. View the account of an user that has private posts (/users/:id)
  2. Open one of their private post (/notice/:id)

Observed behaviour:
Two 404 errors appear

  1. One on https://outerheaven.club/api/v1/accounts/:id?with_relationships=true where :id is the one of the post
  2. One on https://outerheaven.club/api/v1/accounts/null/statuses?with_muted=true&exclude_replies=1&limit=20

Example on https://outerheaven.club/notice/AOSE9pm6Ykf152HiVM (which is a private post) where I get an error on https://outerheaven.club/api/v1/accounts/AOSE9pm6Ykf152HiVM?with_relationships=true and https://outerheaven.club/api/v1/accounts/null/statuses?with_muted=true&exclude_replies=1&limit=20

On public posts like https://outerheaven.club/notice/ANJpfDZZYs1P61EhNY the only error that appear is 1. on https://outerheaven.club/api/v1/accounts/ANJpfDZZYs1P61EhNY?with_relationships=true

The issue seems to only appear when going from viewing an user's profile to a post. Doing so on the timeline doesn't seem to result in 404s

Steps to reproduce: 1. View the account of an user that has private posts (/users/:id) 2. Open one of their private post (/notice/:id) Observed behaviour: Two 404 errors appear 1. One on https://outerheaven.club/api/v1/accounts/:id?with_relationships=true where :id is the one of the post 2. One on https://outerheaven.club/api/v1/accounts/null/statuses?with_muted=true&exclude_replies=1&limit=20 Example on https://outerheaven.club/notice/AOSE9pm6Ykf152HiVM (which is a private post) where I get an error on https://outerheaven.club/api/v1/accounts/AOSE9pm6Ykf152HiVM?with_relationships=true and https://outerheaven.club/api/v1/accounts/null/statuses?with_muted=true&exclude_replies=1&limit=20 On public posts like https://outerheaven.club/notice/ANJpfDZZYs1P61EhNY the only error that appear is 1. on https://outerheaven.club/api/v1/accounts/ANJpfDZZYs1P61EhNY?with_relationships=true The issue seems to only appear when going from viewing an user's profile to a post. Doing so on the timeline doesn't seem to result in 404s
Owner

users ANJpfDZZYs1P61EhNY and AOSE9pm6Ykf152HiVM indeed appear to not exist on your instance - it may be a deactivated account or similar

we'll have to decode the ID to do any meaningful debugging

can you run this on your db?

psql pleroma_prod -c "select nickname, is_active from users where id = '00000183-179a-e7b8-1e02-c11c29f80000' or id = '00000183-c680-143a-f4ee-9a8f43a80000';"

(obviously change the db name if you need)

users ANJpfDZZYs1P61EhNY and AOSE9pm6Ykf152HiVM indeed appear to not exist on your instance - it may be a deactivated account or similar we'll have to decode the ID to do any meaningful debugging can you run this on your db? ```sql psql pleroma_prod -c "select nickname, is_active from users where id = '00000183-179a-e7b8-1e02-c11c29f80000' or id = '00000183-c680-143a-f4ee-9a8f43a80000';" ``` (obviously change the db name if you need)
Poster
 nickname | is_active 
----------+-----------
(0 rows)

Welp, they don't even exist in my DB

``` nickname | is_active ----------+----------- (0 rows) ``` Welp, they don't even exist in my DB
Mergan added the Bug label 4 months ago
Collaborator

What was the conclusion 🤔?

What was the conclusion 🤔?
Poster

It's still happening quite frequently when I open threads, but I don't really have more info than what I already provided. I'm assuming there's an issue with how these URLs are formed in the FE, but I may be wrong.

It's still happening quite frequently when I open threads, but I don't really have more info than what I already provided. I'm assuming there's an issue with how these URLs are formed in the FE, but I may be wrong.
Owner

my hunch here is that it's something to do with suspended users (domain block etc etc)

there's another instance seeing some 404s when deleted users are around

my hunch here is that it's something to do with suspended users (domain block etc etc) there's another instance seeing some 404s when deleted users are around
Owner

ok i can't replicate anything on my side, i've requested an account on your instance to see if i can investigate it there, if that's ok

ok i can't replicate anything on my side, i've requested an account on your instance to see if i can investigate it there, if that's ok
Owner

got it!

thanks for the account approval

it's trying to fetch the relationships of a note ID

wonder why

got it! thanks for the account approval it's trying to fetch the relationships of a note ID wonder why
Owner

image

ahah

so get this - user profiles are told to switch users when the route parameter called id changes - only problem is that both /notice/:id and /user/:id... have an ID param

![image](/attachments/b6932da3-a8e1-4bde-8b99-3255ae2d51cd) ahah so get this - user profiles are told to switch users when the route parameter called `id` changes - only problem is that both `/notice/:id` and `/user/:id`... have an ID param
floatingghost referenced this issue from a commit 4 months ago
Owner

should be fixed! if you update to develop pleroma-fe this should go away

should be fixed! if you update to develop pleroma-fe this should go away
Poster

This is very poggère, thanks for looking into it!

This is very *poggère*, thanks for looking into it!
Poster

I don't recall seeing that issue since I've updated to the last stable, I'm closing it

I don't recall seeing that issue since I've updated to the last stable, I'm closing it
solidsanek closed this issue 3 months ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma-fe#181
Loading…
There is no content yet.