Developer forum

Forum » CMS - Standard features » 'A potentially dangerous Request.Path...' error for CDN images

'A potentially dangerous Request.Path...' error for CDN images

Melissa Borgmann
Melissa Borgmann
Reply

We have a solution that utilizes a CDN (CloudFlare) to serve their images and we're seeing this error message consistently in the Monitoring module (Fig. 1):

2023-12-07 16:38:16.076: A potentially dangerous Request.Path value was detected from the client (:).
System.Web.HttpException (0x80004005): A potentially dangerous Request.Path value was detected from the client (:).
at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)
2023-12-07 16:38:16.076: Request headers: [   "Connection",   "Accept",   "Accept-Encoding",   "From",   "Host",   "User-Agent",   "cdn-loop",   "cf-ipcountry",   "x-forwarded-for",   "cf-ray",   "x-forwarded-proto",   "cf-visitor",   "cf-connecting-ip" ]
2023-12-07 16:38:16.076: Request item keys: [   "ExecutionTableMapper",   "Dynamicweb.Environment.Web" ]
2023-12-07 16:38:16.076: Request form: []

It doesn't seem to impact the frontend templates (the images are still shown as expected) but it does result in excessive logging. Please advise on the best way to prevent this error. Thank you in advance!

Figure 1

 


Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply
This post has been marked as an answer

It seems that there are links which are encoded where they shouldn't be. That might be causing the issues here.
I can see that you have some custom link handling in /Templates/Designs/Swift/Paragraph/Swift_ProductDetailsImage.cshtml, so you might want to take a closer look at that template.
Try to run the W3C link checker and see if you can fix the reported issues in your templates:

https://validator.w3.org/checklink?uri=https%3A%2F%2Fhillsdalefurniture.com%2Fbedroom%2Fbeds%2Fwillow-upholstered-bed%2Ffull-charcoal-yes-fabric&hide_type=all&depth=&check=Check

/Morten

Votes for this answer: 1
 
Melissa Borgmann
Melissa Borgmann
Reply

Thank you Morten! We'll try this out and see where it gets us.

 

You must be logged in to post in the forum