Error with code blocks: 403 Forbidden

Further to this, we nearly always find that 403 errors like this when attempting to create posts (especially with code blocks!) are due to an overzealous WAF believing the code blocks are shellcode or an injection attack.

I note that the instance in question seems to be fronted by a WAF:

○ → host hpc-discourse.uni.lu
hpc-discourse.uni.lu is an alias for fstc-waf2.uni.lu.

and thus I strongly suspect the 403 errors are coming not from Discourse, but from your WAF.

Inspecting the headers of the errors in the browser should be able to tell you the source of the rejection.

7 Likes