Concerns regarding safe mode

AI-generated summary

In a discussion titled ‘Concerns regarding safe mode’ under the Support category, Karl_Romanowski raised concerns that safe mode bypasses server-side restrictions—such as 404 pages hiding /faq, /tos, and /privacy—on forums like Overwatch, exposing site statistics and other hidden content. While he noted there’s no major security threat, he questioned whether safe mode disables Akismet. Falco clarified that safe mode only disables client-side elements (CSS/JS/HTML), not server-side protections. codinghorror acknowledged the issue and consulted sam, who emphasized that sensitive content should be restricted server-side, not merely hidden via soft 404s. codinghorror then directed the decision to eviltrout, who agreed that disabling safe mode via a site setting is a good idea. In a later update, eviltrout confirmed that the latest Discourse version allows admins to disable safe mode entirely via a site setting. Additionally, eviltrout implemented a change ensuring staff members retain access to safe mode even if it’s disabled for regular users, a suggestion originally made by sam.

I believe safe mode should be IP restricted.

For example, the overwatch forums redirect some built-in pages to a 404. Safe mode allows anyone to bypass that 404 and just see the page:

Site Statistics

All Time Last 7 Days Last 30 Days
Topics 60.8k 7.3k 29.7k
Posts 755k 97.6k 386k
Users 92.8k 4.3k 22.7k
Active Users — 31.6k 56.7k
Likes 1.0M 117k 489k

I can also see the other pages they wanted to hide like /faq, /tos, and /privacy

Not a big deal because there’s no real security threat. But does entering safe mode disable Akismet as well?

Nope, safe mode only disable client-side stuff like CSS/JS/HTML.

Interesting, thanks for noting this and bringing it to our attention. Do you have any feelings on this @sam?

I think the issue here is that they did not disable stuff hard enough server side on said forum, if we feel like we do not want end users to get certain info we got to close the tap on the server side, a soft 404 on part of the endpoint may not be enough

So then it is a call that @eviltrout needs to make?

I think an option to disable safe mode is a good thing. I’ll look into it.

In the latest version of Discourse you can disable safe mode via a site setting:

https://github.com/discourse/discourse/commit/fd14ee47979ba859875eac458cc9c37c8029ead8

Here’s a small change: staff members can always use safe mode, even if disabled. @sam suggested this and I think it’s a good idea.

https://github.com/discourse/discourse/commit/a5172a37e0bf2089300783d95f61380e22552120