Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List of Input Values which will cause the "A potentially dangerous Request.Form value was detected..." error

I know the < and > characters will cause this error, but what other characters/inputs will cause this error?

I'm testing for this error in the Global.asax, and reridrecting to an error page where I want to list all possible values which cause this error, so the user can go back to their page and get rid of them.

I've done some googling, but all I see so far are the < and > characters...surely there are more out there.

like image 959
Albert Avatar asked May 03 '10 19:05

Albert


2 Answers

Here is the actual complete list of inputs that will cause the error:

<(any a-z character)  
<!  
</
<?
&#

Note that an angle bracket on it own '<' will not cause an exception.

There is a similar question that has a more complete answer including some code, which is where I derived the list from.

Of course you could always look here for the rest of it if you are concerned.

like image 124
A.R. Avatar answered Sep 24 '22 22:09

A.R.


No, < is not the only character combination that will cause it. &# will cause it as well.

like image 40
Scott Avatar answered Sep 23 '22 22:09

Scott