Hi all, does anyone maybe know of a way to block t...
# masacms
s
Hi all, does anyone maybe know of a way to block the extensive 500 error messages of MASA CMS on production systems, but still show them on DEV-systems? A switch or setting somewhere?
For now I've changed the IIS web.config from <httpErrors errorMode="Detailed" /> to <httpErrors errorMode="DetailedLocalOnly" />. Now I get a simple 500 error message from IIS, instead of all the details from the MASA CMS 500 error. That is fine 4 now!
s
Which 'extensive 500 error messages' are you referring to?
A production system shouldn't be throwing extensive 500 errors (and our Masa system does not)
s
This is what we have now:
s
Maybe investigate why it's throwing a 500? Just worrying about suppressing the 500 seems a bit like 'well our house is on fire, how can we not disturb the neighbors'
there is definitely not anything about Masa in particular that just throws 500 for no reason
s
This is how it was:
s
yeah I'd dig into that and see what's going on there, make sure the version of Masa you're running is current
s
So my question was how do I prevent everyone who deliberately throws an error to disclose information
The solution was in the IIS web.config settings
s
Your IIS solution is one way, Lucee has a setting to only show error/debugging info to certain IPs or not at all as well
s
I wanted to prevent unnecessary information disclosure
s
but I'm not clear on why anybody would be 'deliberately throwing an error' on production
s
I have set the Lucee error-handling to error_public in the Server-admin, it still throws the error shown with all the information I do not want to disclose - hence the IIS setting change
s
you're right that you should be suppressing that stuff to the general public, but ideally, it doesn't error in the first place
s
So my question was on how to suppress this, not about having a specific error 🙂
Background was a PEN-test where information disclosure when throwing an error (forced or unforced) was an issue to be handled better in MASA CMS websites
r
See the debuggingenabled and errortemplate settings - https://docs.masacms.com/getting-started/configuration/configuration-file/ We set debuggingenabled to True on local and dev to see robust error info and false on stage and prod where we render a custom friendly error page and send the actual error details to our application monitoring channels.