Discourse forum somewhat broken, I can't post the command to show the linux kernel version

Ok, I could narrow it down, apparently it’s not the length of the post but the string that I won’t attempt to type here, but it’s the command to show the current linux kernel version?!

How can Discourse be this broken?!

After looking at your text, I was just about to post.
Yeah, there is a known issue in the discourse forum software. Some specific text that linux users might post is blocked. If I recall, a Framework staff member looked into it a bit and said that it seems to be coming from a fairly low level place in the discourse forum software, someplace they can’t really fix.

So I’m afraid, the only thing we can do is, find offending text and alter your post…

I’d really like the technical details on this because this is unbelievable O_O

(Not saying I don’t believe you, but it’s absolutely bonkers and I’m really curious)

Yep, I get a 403 error trying to post uname‎ -a

~edit~
I put a No-Break Space ( ) between “uname‎” and “-a”

1 Like

I’m sorry, I don’t recall much that would help searching for the thread. It was some time ago. You guess on search terms to find it might be as good as mine.

I don’t think this is a general Discourse problem, at least the libSDL discourse doesn’t seem to have this problem:

(no “drafts offline” warning)

Well, now that would be extra annoying. If it was just here.

You could bring it up here Framework Community Forums - Feedback and Updates Thread

And link them to this thread.

In the meantime, throw a No-Break Space ( ) in there and it will post.

2 Likes

Workaround for now: uname --all which is equivalent as far as the command is concerned, but doesn’t trigger the Discourse bug.

Framework should really fix their Discourse installation though, this is extremely irritating and frustrating and almost prevented me from sharing my findings at all (you’re just lucky I was a bit bored and motivated and had some time)

You could say they might be lucky, but I’m not with Framework staff. Just a normal user who is pretty active here.

I meant “you” in the second person plural sense, not you personally :wink:

Anyway, thanks for your help!

The Haiku Discord has just this evening updated to version 3.3.1. Dunno what version we are at here.

Haiku Discourse? do they have the same issue? :eyes: trying to understand if the update would solve the issue.

It’s just another Discourse where we discuss Haiku.

I had the exact same frustration as in the OP a week ago when I was on a sketchy WiFi connection. Are you on a weak or intermittent internet connection?

If you can’t finish in one session try closing your post between editing it will offer you to save as a draft to reopen later.

The manager of this forum might want to update to the latest version too - since update Haiku now shows notifications on my Discord mobile app which is a bonus.

The question is, is it possible to post
image
in the Haiku Discord, i.e. would the update to 3.3.1 fix this issue for the Framework Discourse?

BTW, the SDL Discourse seems to use 3.4.0.beta2-dev

My internet connection is very stable.

1 Like

I typed in those magic words and it is fine in the Haiku discourse but can confirm - on the same machine - break it here on the Framework forum. So the glitch would appear to have been fixed by version 3.3.1.

1 Like

I think the following thread’s issue may come from a similar cause to this thread’s issue. I am not sure what the “WAF” means.

Whenever a post contains "substring" I get a 403 error - #4 by Mr.X_Mr.X - Support - Discourse Meta

You might have a WAF enabled that blocks XSS attempts and substring is commonly used in the exploit syntax. If you’re using Cloudflare with WAF enabled that would be the cause.

2 Likes

This is ridiculous O_O

Assuming Discourse is properly written software (I don’t know if it is, but if it isn’t maybe people should stop using it), one should be able to post anything without causing XSS attacks or similar - it’s not supposed to execute users posts as code, but just to display them

I guess that a software layer or network filtering out the specific words may be different from the place of Discourse application.

I imagined, the software layers such as Discourse (Ruby on Rails, web application) on an HTTP(S) server (Nginx or HTTPD), or HTTP(S) client-server network process, or a firewall between a client and a server.

2 Likes

You might be right about this, someone sent me this link with this suspicious line: coreruleset/rules/REQUEST-932-APPLICATION-ATTACK-RCE.conf at main · coreruleset/coreruleset · GitHub (and WAF supports OWASP rules: WAF Managed Rules)

However, if this is the case, WAF is misconfigured for this particular usecase, IMHO.
People should be able to post arbitrary text, including code and linux shell commands, to this forum, and I’m sure Discourse will be able to escape it properly instead of executing it.
If it doesn’t, this WAF snakeoil isn’t gonna save you anyway, as circumventing it seems easy enough (for example uname --all is accepted even though it does the exact same thing as the forbidden uname invocation - though I’m not sure what was supposed to be so bad about uname in the first place).

And if you think that you need something like this after all, it needs better integration - neither the “drafts offline” nor the “403” message are useful at all. As the very minimum, Discourse would have to tell the user that the post contains a forbidden word/sequence of characters, but of course if you respect your users time you should also tell them what exactly that word was so they can easily fix it.
But really, just don’t use this at all, at least not to filter text from posts.