Unwrapped code block prevents further edits

AI-generated summary

A user, Divinebaboon, reported that editing a reply containing an unwrapped code block triggers a 403 error in their forum, despite having Trust Level 4 and testing on their own post. They noted the issue didn’t occur in this forum but persisted in another. In a follow-up, Divinebaboon shared a code snippet that may have triggered the issue. Arkshine suggested checking browser console and network logs, suspecting a draft-related issue, and asked if it persisted in safe mode. Divinebaboon confirmed it still occurred in safe mode and shared screenshots of console errors, mentioning a user’s theory that Cloudflare might be the cause. Arkshine referenced a similar past issue involving Cloudflare’s WAF and code blocks. Ultimately, Divinebaboon confirmed the root cause was indeed Cloudflare’s Web Application Firewall (WAF), resolving the mystery. The issue highlights how improperly formatted code blocks can trigger security filters like Cloudflare’s WAF, even for trusted users.

A user posted a reply like the one below, and then after it’s posted, when anyone tries to edit it, they will be met with a 403 error.

Example reply that causes the error is below.

Edit: weird, I don’t know why I can edit it in this forum, but in the other forum, I get the 403 error…
I have Trust level 4 there, and i tried it on my own reply so permissions should not be an issue.

After adding all the cards, open the command line (Terminal.app). Copy and paste the code below.

mkdir ~/Desktop/cards
files=(~/Library/Passes/Cards/*.pkpass/cardBackgroundCombined@2x.png)
i=0
for f in "${files[@]}"; do
    i=$(( i + 1 ))
    cp $f ~/Desktop/cards/$i.png
done

Hi, welcome to Meta :wave:

Can you check the browser’s console (and Network tab) to understand from what request you get a 403?
It’s possibly the draft I think :thinking:.

Also, does it still happen in safe mode?

Thanks for the response, I just tried safe-mode with all the checkboxes checked, still happens
here are the network and console tabs, these two console tab errors show up when i trigger the error.

A user suggested that it’s caused by cloudflare..

You may be right. Here is a similar topic:

Thank you for your help, it was indeed Cloudflare WAF.