[bug] profile with larger than usual account headers causes excessive outgoing requests #661

Open
opened 2023-11-15 22:22:57 +00:00 by flisk · 2 comments
Contributor

Your setup

OTP

Extra details

No response

Version

3.10.4-0-gebfb617

PostgreSQL version

15

What were you trying to do?

run an akkoma instance

What did you expect to happen?

i expected akkoma to not refetch a user profile that has an unusually large number of header fields as fast as possible

What actually happened?

it did that, and i hope the instance admin isn't mad at me

Logs

Nov 15 22:10:25 blahaj pleroma[1094106]: [error] Could not fetch user https://hellsite.site/users/the_feral_housewife, {nil, {:error, #Ecto.Changeset<action: :insert, changes: %{ap_enabled: true, ap_id: "https://hellsite.site/users/the_fe
ral_housewife", avatar: %{"type" => "Image", "url" => [%{"href" => "https://hellsite.site/system/accounts/avatars/000/125/368/original/437b8fdeddf3a5d4.jpeg"}]}, banner: %{"type" => "Image", "url" => [%{"href" => "https://hellsite.site/sy
stem/accounts/headers/000/125/368/original/ea5f441dc3a544e5.jpg"}]}, bio: "<p>hi im spigot hellsite</p><p>in many ways i am the demon cussy of the timed line</p><p>i post a lot but when i do it&#39;s pure nonsense</p><p>read the bio field
s above or don&#39;t idfc</p><p>fill out your profile before sending a FR</p><p>yes i post nudes be cool about it</p><p>*****</p><p>here&#39;s some testimonials:</p><p>&quot;you are destined for hell bestie&quot; --<span class=\"h-card\"
translate=\"no\"><a href=\"https://hellsite.site/@lydia\" class=\"u-url mention\">@<span>lydia</span></a></span></p><p>&quot;top 10 asses of all time&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://hellsite.site/@th
atchers_piss_slut\" class=\"u-url mention\">@<span>thatchers_piss_slut</span></a></span></p><p>&quot;well out of ordah m8&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://surfin.dog/@finn\" class=\"u-url mention\">@<
span>finn</span></a></span></p><p>&quot;powerful and brave&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://goblin.camp/@sugar\" class=\"u-url mention\">@<span>sugar</span></a></span></p><p>&quot;this bitch is2g&quot
;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://octodon.social/@Mainebot\" class=\"u-url mention\">@<span>Mainebot</span></a></span></p><p>&quot;we need a word for when you see cursed posts, it makes you sigh like a dis
appointed uncle at the bbq, and then laugh cause it&#39;s a catastrophe and amusing&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://scholar.social/@Cyborgneticz\" class=\"u-url mention\">@<span>Cyborgneticz</span></
a></span></p><p>&quot;spigot is hands down one of the best posters on this webbed site machine.&quot;, &quot;Terrible? Often. Confusing? Nearly always. A blessing to the TL? Absolutely&quot;<br />--<span class=\"h-card\" translate=\"no\">
<a href=\"https://glitterkitten.co.uk/@doot\" class=\"u-url mention\">@<span>doot</span></a></span></p><p>&quot;ohhhh this is bad. no boost no fav&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://octodon.social/@Aleu
ms\" class=\"u-url mention\">@<span>Aleums</span></a></span></p><p>&quot;you gotta hand it to spigot hellsite, no one else is making these posts&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://monads.online/@parenth
etical\" class=\"u-url mention\">@<span>parenthetical</span></a></span></p><p>&quot;Your posts cause me pain.&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://goblin.camp/@breakfastgolem\" class=\"u-url mention\">@<s
pan>breakfastgolem</span></a></span></p><p>&quot;No one embodies hellsite quite like spigot does.&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://hellsite.site/@goat\" class=\"u-url mention\">@<span>goat</span></a><
/span></p><p>&quot;horrible filthy little post that makes me greasy down thaire&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://octodon.social/@CobaltVelvet\" class=\"u-url mention\">@<span>CobaltVelvet</span></a></
span></p><p>*****</p><p>crossposters and scrapers dni and also jump off a cliff<br />minors dni</p>", featured_address: "https://hellsite.site/users/the_feral_housewife/collections/featured", fields: [%{"name" => "p-nouns", "value" => "th
ey/she/it"}, %{"name" => "gender", "value" => "a-"}, %{"name" => "30", "value" => "something"}, %{"name" => "coding?", "value" => "python"}, %{"name" => "metalwork?", "value" => "aluminum"}, %{"name" => "cooking?", "value" => "steak and p
otats"}, %{"name" => "acoustic?", "value" => "guitar/percussion"}, %{"name" => "digital?", "value" => "turntablism"}, %{"name" => "ice cream?", "value" => "strawberry-rhubarb"}, %{"name" => "painting?", "value" => "gunpla"}, %{"name" => "
game01?", "value" => "slay the spire"}, %{"name" => "game02?", "value" => "slay the spire: downfall"}, %{"name" => "game03?", "value" => "feet fighter 6"}, %{"name" => "music?", "value" => "funky tech house"}, %{"name" => "workout?", "val
ue" => "sk8ing"}, %{"name" => "mineral?", "value" => "salt"}, %{"name" => "shitposts?", "value" => "rancid"}, %{"name" => "knitting?", "value" => "yes"}, %{"name" => "screenprinting?", "value" => "yes"}, %{"name" => "filthy", "value" => "
american"}, %{"name" => "get", "value" => "shit on"}, %{"name" => "stimpky", "value" => "kobold"}, %{"name" => "hrt?", "value" => "6ish years i think"}, %{"name" => "transportation?", "value" => "longboard"}, %{"name" => "bed?", "value" =
> "king"}, %{"name" => "pillows?", "value" => "11"}, %{"name" => "gold medals", "value" => "1"}, %{"name" => "silver medals", "value" => "1"}, %{"name" => "pickles?", "value" => "hell YES"}, %{"name" => "non-cucumber pickles?", "value" =>
 "HELL YES"}, %{"name" => "SPICY PICKLED CARROTS???", "value" => "98q34ph5qpawdgfohia;w38rha;swefoij"}, %{"name" => "certified", "value" => "orb-shrinker club"}, %{"name" => "certified", "value" => "orb-growing club"}, %{"name" => "kink l
ist??", "value" => "long and convoluted"}, %{"name" => "yip?", "value" => "yip yip!"}, %{"name" => "favorite bodily fluid", ...}, %{...}, ...], follower_address: "https://hellsite.site/users/the_feral_housewife/followers", following_addre
ss: "https://hellsite.site/users/the_feral_housewife/following", inbox: "https://hellsite.site/users/the_feral_housewife/inbox", is_locked: true, last_refreshed_at: ~N[2023-11-15 22:10:25.528552], name: "spigot hellsite, inventor of the f
rotdog", nickname: "the_feral_housewife@hellsite.site", pinned_objects: %{"https://hellsite.site/users/the_feral_housewife/statuses/109308959568782651" => ~N[2023-11-15 22:10:25.511213], "https://hellsite.site/users/the_feral_housewife/statuses/109309008822549936" => ~N[2023-11-15 22:10:25.511222], "https://hellsite.site/users/the_feral_housewife/statuses/109309023905473739" => ~N[2023-11-15 22:10:25.511219], "https://hellsite.site/users/the_feral_housewife/statuses/109309131989383660" => ~N[2023-11-15 22:10:25.511224], "https://hellsite.site/users/the_feral_housewife/statuses/109309164427992884" => ~N[2023-11-15 22:10:25.511227]}, public_key: "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv2UkWKluvfbasktP+NTn\nSXZ05czyP0O21JNOHxMXeqsNe4yjxzrwbhUCwKyoN0rH2TyJh+0fb5zS6fKr1eb7\nEVObVp+7dKmI7UrE2ll5pJp0/2j6nYNxSUlcnY0X+mFzut5NDgfAWtUXuanfYFg/\nlA5doA0MkmUaC0Mp1KOYkm0KbQn7LbqhgEjm5613sbWRKaou+pDonQo/8kMqYgkA\nS9jORMv613WZQY6asIQufh24VBmJk83BfVRoVsVbt1YyyeOcnOv9kH0TLtEq9Ncx\nHy7/yNIwQnkw1p5DraVJrWAyrQvApLm882HGiOqjmbJJ+4u+1FHFcx5hYQa1OzRf\nlwIDAQAB\n-----END PUBLIC KEY-----\n", shared_inbox: "https://hellsite.site/inbox", uri: "https://hellsite.site/@the_feral_housewife"}, errors: [fields: {"should have at most %{count} item(s)", [count: 20, validation: :length, kind: :max, type: :list]}], data: #Pleroma.User<>, valid?: false>}}
...
(many thousands of lines more like this)

Severity

I cannot use it as easily as I'd like

Have you searched for this issue?

  • I have double-checked and have not found this issue mentioned anywhere.
### Your setup OTP ### Extra details _No response_ ### Version 3.10.4-0-gebfb617 ### PostgreSQL version 15 ### What were you trying to do? run an akkoma instance ### What did you expect to happen? i expected akkoma to not refetch a user profile that has an unusually large number of header fields as fast as possible ### What actually happened? it did that, and i hope the instance admin isn't mad at me ### Logs ```shell Nov 15 22:10:25 blahaj pleroma[1094106]: [error] Could not fetch user https://hellsite.site/users/the_feral_housewife, {nil, {:error, #Ecto.Changeset<action: :insert, changes: %{ap_enabled: true, ap_id: "https://hellsite.site/users/the_fe ral_housewife", avatar: %{"type" => "Image", "url" => [%{"href" => "https://hellsite.site/system/accounts/avatars/000/125/368/original/437b8fdeddf3a5d4.jpeg"}]}, banner: %{"type" => "Image", "url" => [%{"href" => "https://hellsite.site/sy stem/accounts/headers/000/125/368/original/ea5f441dc3a544e5.jpg"}]}, bio: "<p>hi im spigot hellsite</p><p>in many ways i am the demon cussy of the timed line</p><p>i post a lot but when i do it&#39;s pure nonsense</p><p>read the bio field s above or don&#39;t idfc</p><p>fill out your profile before sending a FR</p><p>yes i post nudes be cool about it</p><p>*****</p><p>here&#39;s some testimonials:</p><p>&quot;you are destined for hell bestie&quot; --<span class=\"h-card\" translate=\"no\"><a href=\"https://hellsite.site/@lydia\" class=\"u-url mention\">@<span>lydia</span></a></span></p><p>&quot;top 10 asses of all time&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://hellsite.site/@th atchers_piss_slut\" class=\"u-url mention\">@<span>thatchers_piss_slut</span></a></span></p><p>&quot;well out of ordah m8&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://surfin.dog/@finn\" class=\"u-url mention\">@< span>finn</span></a></span></p><p>&quot;powerful and brave&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://goblin.camp/@sugar\" class=\"u-url mention\">@<span>sugar</span></a></span></p><p>&quot;this bitch is2g&quot ;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://octodon.social/@Mainebot\" class=\"u-url mention\">@<span>Mainebot</span></a></span></p><p>&quot;we need a word for when you see cursed posts, it makes you sigh like a dis appointed uncle at the bbq, and then laugh cause it&#39;s a catastrophe and amusing&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://scholar.social/@Cyborgneticz\" class=\"u-url mention\">@<span>Cyborgneticz</span></ a></span></p><p>&quot;spigot is hands down one of the best posters on this webbed site machine.&quot;, &quot;Terrible? Often. Confusing? Nearly always. A blessing to the TL? Absolutely&quot;<br />--<span class=\"h-card\" translate=\"no\"> <a href=\"https://glitterkitten.co.uk/@doot\" class=\"u-url mention\">@<span>doot</span></a></span></p><p>&quot;ohhhh this is bad. no boost no fav&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://octodon.social/@Aleu ms\" class=\"u-url mention\">@<span>Aleums</span></a></span></p><p>&quot;you gotta hand it to spigot hellsite, no one else is making these posts&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://monads.online/@parenth etical\" class=\"u-url mention\">@<span>parenthetical</span></a></span></p><p>&quot;Your posts cause me pain.&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://goblin.camp/@breakfastgolem\" class=\"u-url mention\">@<s pan>breakfastgolem</span></a></span></p><p>&quot;No one embodies hellsite quite like spigot does.&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://hellsite.site/@goat\" class=\"u-url mention\">@<span>goat</span></a>< /span></p><p>&quot;horrible filthy little post that makes me greasy down thaire&quot;<br />--<span class=\"h-card\" translate=\"no\"><a href=\"https://octodon.social/@CobaltVelvet\" class=\"u-url mention\">@<span>CobaltVelvet</span></a></ span></p><p>*****</p><p>crossposters and scrapers dni and also jump off a cliff<br />minors dni</p>", featured_address: "https://hellsite.site/users/the_feral_housewife/collections/featured", fields: [%{"name" => "p-nouns", "value" => "th ey/she/it"}, %{"name" => "gender", "value" => "a-"}, %{"name" => "30", "value" => "something"}, %{"name" => "coding?", "value" => "python"}, %{"name" => "metalwork?", "value" => "aluminum"}, %{"name" => "cooking?", "value" => "steak and p otats"}, %{"name" => "acoustic?", "value" => "guitar/percussion"}, %{"name" => "digital?", "value" => "turntablism"}, %{"name" => "ice cream?", "value" => "strawberry-rhubarb"}, %{"name" => "painting?", "value" => "gunpla"}, %{"name" => " game01?", "value" => "slay the spire"}, %{"name" => "game02?", "value" => "slay the spire: downfall"}, %{"name" => "game03?", "value" => "feet fighter 6"}, %{"name" => "music?", "value" => "funky tech house"}, %{"name" => "workout?", "val ue" => "sk8ing"}, %{"name" => "mineral?", "value" => "salt"}, %{"name" => "shitposts?", "value" => "rancid"}, %{"name" => "knitting?", "value" => "yes"}, %{"name" => "screenprinting?", "value" => "yes"}, %{"name" => "filthy", "value" => " american"}, %{"name" => "get", "value" => "shit on"}, %{"name" => "stimpky", "value" => "kobold"}, %{"name" => "hrt?", "value" => "6ish years i think"}, %{"name" => "transportation?", "value" => "longboard"}, %{"name" => "bed?", "value" = > "king"}, %{"name" => "pillows?", "value" => "11"}, %{"name" => "gold medals", "value" => "1"}, %{"name" => "silver medals", "value" => "1"}, %{"name" => "pickles?", "value" => "hell YES"}, %{"name" => "non-cucumber pickles?", "value" => "HELL YES"}, %{"name" => "SPICY PICKLED CARROTS???", "value" => "98q34ph5qpawdgfohia;w38rha;swefoij"}, %{"name" => "certified", "value" => "orb-shrinker club"}, %{"name" => "certified", "value" => "orb-growing club"}, %{"name" => "kink l ist??", "value" => "long and convoluted"}, %{"name" => "yip?", "value" => "yip yip!"}, %{"name" => "favorite bodily fluid", ...}, %{...}, ...], follower_address: "https://hellsite.site/users/the_feral_housewife/followers", following_addre ss: "https://hellsite.site/users/the_feral_housewife/following", inbox: "https://hellsite.site/users/the_feral_housewife/inbox", is_locked: true, last_refreshed_at: ~N[2023-11-15 22:10:25.528552], name: "spigot hellsite, inventor of the f rotdog", nickname: "the_feral_housewife@hellsite.site", pinned_objects: %{"https://hellsite.site/users/the_feral_housewife/statuses/109308959568782651" => ~N[2023-11-15 22:10:25.511213], "https://hellsite.site/users/the_feral_housewife/statuses/109309008822549936" => ~N[2023-11-15 22:10:25.511222], "https://hellsite.site/users/the_feral_housewife/statuses/109309023905473739" => ~N[2023-11-15 22:10:25.511219], "https://hellsite.site/users/the_feral_housewife/statuses/109309131989383660" => ~N[2023-11-15 22:10:25.511224], "https://hellsite.site/users/the_feral_housewife/statuses/109309164427992884" => ~N[2023-11-15 22:10:25.511227]}, public_key: "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv2UkWKluvfbasktP+NTn\nSXZ05czyP0O21JNOHxMXeqsNe4yjxzrwbhUCwKyoN0rH2TyJh+0fb5zS6fKr1eb7\nEVObVp+7dKmI7UrE2ll5pJp0/2j6nYNxSUlcnY0X+mFzut5NDgfAWtUXuanfYFg/\nlA5doA0MkmUaC0Mp1KOYkm0KbQn7LbqhgEjm5613sbWRKaou+pDonQo/8kMqYgkA\nS9jORMv613WZQY6asIQufh24VBmJk83BfVRoVsVbt1YyyeOcnOv9kH0TLtEq9Ncx\nHy7/yNIwQnkw1p5DraVJrWAyrQvApLm882HGiOqjmbJJ+4u+1FHFcx5hYQa1OzRf\nlwIDAQAB\n-----END PUBLIC KEY-----\n", shared_inbox: "https://hellsite.site/inbox", uri: "https://hellsite.site/@the_feral_housewife"}, errors: [fields: {"should have at most %{count} item(s)", [count: 20, validation: :length, kind: :max, type: :list]}], data: #Pleroma.User<>, valid?: false>}} ... (many thousands of lines more like this) ``` ### Severity I cannot use it as easily as I'd like ### Have you searched for this issue? - [ ] I have double-checked and have not found this issue mentioned anywhere.
flisk added the
bug
label 2023-11-15 22:22:57 +00:00
Author
Contributor

sorry for the low quality bug report im very tired and barely have time to write this

sorry for the low quality bug report im very tired and barely have time to write this
Author
Contributor

this problem can be worked around by increasing the default value of "Max remote account fields" in the admin frontend to a sufficiently large number. i've gone with 100.

i think there's still a bug to be fixed here though. firing off thousands of requests for the same endpoint due to a validation error doesn't seem like reasonable behavior.

this problem can be worked around by increasing the default value of "Max remote account fields" in the admin frontend to a sufficiently large number. i've gone with 100. i think there's still a bug to be fixed here though. firing off thousands of requests for the same endpoint due to a validation error doesn't seem like reasonable behavior.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma#661
No description provided.