Cannot type "/ etc / hosts" (without the spaces)

  • Thread starter Thread starter Wrichik Basu
  • Start date Start date
  • Tags Tags
    Type
Click For Summary

Discussion Overview

The discussion revolves around a technical issue related to posting the string "/etc/hosts" on Physics Forums, specifically focusing on the restrictions imposed by Cloudflare's security measures. Participants explore the implications of these restrictions on content submission, including the inability to type the string without spaces.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant reports being blocked from posting the string "/etc/hosts" without spaces, citing a security message from Cloudflare.
  • Another participant tests the string in a different format and claims it works fine, suggesting a workaround.
  • A participant confirms the issue, stating that submitting the string without spaces triggers an error dialog.
  • There is a reference to a similar bug discussed in another thread, indicating a potential pattern of issues related to content submission.
  • Some participants speculate that the format of the content is triggering Cloudflare's security detection, particularly for known attack payloads.
  • One participant suggests that the issue may not occur with application/json content and proposes a potential solution involving the front end of the forum software.
  • Another participant emphasizes that the blocking of such strings is expected due to their association with security threats.
  • There is a discussion about how participants are able to write the string in the thread, with suggestions on changing editor modes to bypass restrictions.

Areas of Agreement / Disagreement

Participants express differing experiences regarding the ability to post the string "/etc/hosts". While some confirm the issue, others suggest it can be circumvented, indicating a lack of consensus on the problem's scope and solutions.

Contextual Notes

The discussion highlights limitations related to content submission formats and the security measures in place, but does not resolve the underlying technical issues or provide a definitive solution.

Wrichik Basu
Science Advisor
Insights Author
Gold Member
Messages
2,180
Reaction score
2,690
I was trying to paste the hosts file in this thread, and ran into an exception:

1662025162260.png


I can't paste the full error message from the console because PF is not allowing me to do so. Here is the error message:

Sorry, you have been blocked
You are unable to access physicsforums.com
Why have I been blocked?
This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.

What can I do to resolve this?
You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.

Cloudflare Ray ID: 743cfbb7cc8df8d7 • Your IP: <Removed_by_me> • Performance & security by Cloudflare

Upon further testing, it turns out that I can paste the hosts file, but cannot type / etc / hosts (without the spaces). Neither in code blocks nor as plain text.
 
Computer science news on Phys.org
Test: ##\texttt{/} \texttt{etc} \texttt{/} \texttt{hosts}##

Works fine with me. (OK, I cheated a lot :smile:)
 
  • Haha
Likes   Reactions: Wrichik Basu
Quick test.
[code title="/ etc / hosts"]/ etc / hosts[/code]
I can confirm the problem. If I leave out the spaces in either the title or the body of the code block, then I can preview it just fine, but if I try to submit it gives the "Problem encountered" dialog and I cannot submit.
 
  • Like
Likes   Reactions: Wrichik Basu
Something about the format of the content in the request is tripping CF's detection.
 
  • Like
Likes   Reactions: Wrichik Basu
CloudFlare simply won't let the string /etc/hosts through in a multipart/form-data request, presumably because this is a known attack payload. This is also the case with many other strings like <script>.

I don't think CF would be so picky about application/json content, perhaps you could persuade ZenForo to rewrite their front end XHR handler?
 
  • Like
  • Informative
Likes   Reactions: Wrichik Basu, Greg Bernhardt and Vanadium 50
Take a screenshot, then post that.
 
pbuk said:
known attack payload
That's the key. If you type content like that, you shouldn't be surprised when its blocked. ("But your honor, the gun wasn't loaded!")
 
pbuk said:
CloudFlare simply won't let the string /etc/hosts through in a multipart/form-data request, presumably because this is a known attack payload. This is also the case with many other strings like <script>.
But how did you write these?
 
  • #10
Wrichik Basu said:
But how did you write these?
Click "Reply" and you'll see...
 
  • Informative
Likes   Reactions: jack action
  • #11
pbuk said:
Click "Reply" and you'll see...
This is what I see:

1662132954757.png
 
  • #12
Wrichik Basu said:
This is what I see:
Ah you also have to click the [ ] icon in the editor bar to leave WYSYWIG mode.
1662133729717.png
 
  • Like
Likes   Reactions: Wrichik Basu

Similar threads

Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
Replies
63
Views
5K
  • · Replies 2 ·
Replies
2
Views
14K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
2
Views
6K
  • · Replies 6 ·
Replies
6
Views
9K
  • · Replies 1 ·
Replies
1
Views
5K