Welcome to Codidact Meta!
Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.
Blocked from posting to Collab by script tag inside code block
I am currently unable to post to Codidact Collab. When pressing "Save Post to Q&A" I am taken to the following page:
The small print at the bottom says:
Cloudflare Ray ID: 7b7c1ee0bdc87761
In case it's relevant: (turns out it wasn't)
I am able to post to Codidact Meta (this post you are reading is from the same account - I only have one).The question I'm attempting to post to Collab contains 3 links, to pages oncodidact.org
, Wikipedia, and GitHub.I am able to post a comment on Collab - I tested by posting a comment on this older post of mine
Root cause
It appears this was due to a <script>
tag being included in a code block in the question. I was able to post the question to Collab after removing the tag.
Example
The following code block cannot be edited into a post on Collab, although editing into this Meta post worked fine:
<script src="https://cdn.jsdelivr.net/npm/@codidact/co-design@0.12.5/js/co-design.js" defer></script>
As <script>
tags are fairly common in front end code, this is still a problem, although a much smaller scope problem than being unable to post anything to Collab.
1 answer
Summarizing some discussion in Discord (Communities server, network-town-hall): the problem wasn't trichoplax or an IP issue but, rather, a code block that contains a script
tag. Cloudflare is detecting that as an attempt to inject Javascript, apparently — it doesn't detect the difference between something that could execute and something that's just shown in a code block. We'll need to do some more digging to figure out the best way to fix this. (I'm a little surprised we haven't run into this already on Software Development. Or maybe we did and someone gave up instead of reporting the problem.)
Thanks to Moshi and trichoplax for the debugging.
1 comment thread