Posts

Showing posts from September, 2014

Always enforcing your sites single language in Sitecore

PROBLEM BACKGROUND Do you have a sitecore website that will exist in only one language? Have you checked what will happen if someone accesses your site passing the query string parameter sc_lang where sc_lang is set to a value your site doesn't support?   Your site might throw a 500 error, it could redirect the user to your custom error page or it could throw a yellow screen of death. Try your site out, see what happens.      You might be wondering why would this ever happen? I became aware of this issue when one of our designers tried to pass an unsupported language to the sc_lang parameter to see what would happen.   Our site redirected the user to our error page, showing no content. We all know malicious users exist.  If they find you are running a Sitecore instance, they can try to pass query string parameters to your site to see what happens. If they get the ysod they might get useful information. POTENTIAL RESOLUTION Keep in mind, Sitecore is working as des