(Bug Report) Post can be much larger when viewed on PieFed compared to Lemmy

9 months ago by anti_vibecoder to c/piefed_help

example reproduction __CODE_PLACEHOLDER_1____CODE_PLACEHOLDER_1____CODE_PLACEHOLDER_1____CODE_PLACEHOLDER_1____CODE_PLACEHOLDER_1____CODE_PLACEHOLDER_1__ __CODE_PLACEHOLDER_2____CODE_PLACEHOLDER_2____CODE_PLACEHOLDER_2____CODE_PLACEHOLDER_2____CODE_PLACEHOLDER_2____CODE_PLACEHOLDER_2__ __CODE_PLACEHOLDER_3____CODE_PLACEHOLDER_3____CODE_PLACEHOLDER_3____CODE_PLACEHOLDER_3____CODE_PLACEHOLDER_3____CODE_PLACEHOLDER_3__ __CODE_PLACEHOLDER_4____CODE_PLACEHOLDER_4____CODE_PLACEHOLDER_4____CODE_PLACEHOLDER_4____CODE_PLACEHOLDER_4____CODE_PLACEHOLDER_4__ __CODE_PLACEHOLDER_5____CODE_PLACEHOLDER_5____CODE_PLACEHOLDER_5____CODE_PLACEHOLDER_5____CODE_PLACEHOLDER_5____CODE_PLACEHOLDER_5__ this text is repeated many many times

wjs018 2 points 9 months ago

Ah, I see what is going on. This basically requires maliciously formatted markdown that takes advantage of some placeholder text we use to protect codeblocks from getting incorrectly formatted by the markdown_to_html function. You basically stuff the markdown full of those placeholder strings so that they are incorrectly being substituted.

I will give this one some thought. I think it might make sense to have something like a short, random string tacked onto the end of the placeholder text (like I did for the footnote links to prevent id collisions).

path: 0 21391751, hotness: undefined, score: 2, children: 0
anti_vibecoder 2 points 9 months ago
path: 0 21390792, hotness: undefined, score: 2, children: 0
tenaciousd 1 point 9 months ago

I dont get it

path: 0 21409256, hotness: undefined, score: 1, children: 1
wjs018 1 point 9 months ago

This was a bug that we patched yesterday. Originally, this post basically acted like a zip bomb and the text blew up to be enormously huge to the point that the page often wasn't loading correctly. This user basically found an exploit in PieFed's markdown to html conversion and, instead of disclosing it to the maintainers, made a troll-y post about it that started breaking things.

It is patched now though as of PieFed 1.4.5.

path: 0 21409256 21409921, hotness: undefined, score: 1, children: 0
tenaciousd 1 point 9 months ago
path: 0 21409246, hotness: undefined, score: 1, children: 0
piefed_help
piefed_help

@piefed.social

login for more options
3048
314
101

A community to help each other with PieFed.

Rules

Be kind! We're all learning.

Once a bug has been confirmed, someone please add it to the codeberg issue tracker or it'll be forgotten about.

go to feed...