Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A potentially dangerous Request.Path value was detected from the client (:)

I'am getting sometimes the following error on my published web app with ELMAH:

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)

in the URL reported by elmah I get:

/https:/domain.com/

Do I have to put the following line in my web.config, to fix it?:

<httpRuntime requestValidationMode="2.0" />

What this really means? I should be careful about this?

like image 291
elranu Avatar asked Nov 19 '25 10:11

elranu


1 Answers

These are usually either bots crawling your sites, or hackers trawling for vulnerabilities. Normally they are nothing to worry about. Probably you just want elmah to ignore these errors. Add a filter:

<errorFilter>
<test>
    <regex binding="Exception.Message" 
           pattern="(?ix: \b potentially \b.+?\b dangerous \b.+?\b value \b.+?\b detected \b.+?\b client \b )" />
</test>

http://code.google.com/p/elmah/wiki/ErrorFilterExamples

like image 151
simon831 Avatar answered Nov 22 '25 03:11

simon831



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!