Does anyone know where the alttemplate querytring value is first processed at the request level?
I've got an Umbraco (6.2.5) site which is failing a security scan because you can add...
"?alttemplate=<!--"
For example, as the value. I'd like to HtmlEncode it but I don't know where/how in the application flow that this is handled. The ASP.NET YSOD fires long before any page/template where I am personally doing anything with that value:
A potentially dangerous Request.QueryString value was detected from the client (alttemplate="<!--").
if you want to keep the altTemplate functionality, but handle the comment attack; I think you'll need to register your own replacement version of the IContentFinder ContentFinderByNiceUrlAndTemplate
AltTemplates -- Potentially Dangerous Request -- HtmlEncode?
Hi,
Does anyone know where the alttemplate querytring value is first processed at the request level?
I've got an Umbraco (6.2.5) site which is failing a security scan because you can add...
For example, as the value. I'd like to HtmlEncode it but I don't know where/how in the application flow that this is handled. The ASP.NET YSOD fires long before any page/template where I am personally doing anything with that value:
Anything I can do to prevent this error?
Thanks,
Garrett
If you don't use the altTemplate functionality you can now turn it off in the umbracoSettings.config file at the bottom:
if you want to keep the altTemplate functionality, but handle the comment attack; I think you'll need to register your own replacement version of the IContentFinder ContentFinderByNiceUrlAndTemplate
https://github.com/umbraco/Umbraco-CMS/blob/d50e49ad37fd5ca7bad2fd6e8fc994f3408ae70c/src/Umbraco.Web/Routing/ContentFinderByNiceUrlAndTemplate.cs
is working on a reply...