【发布时间】:2016-04-19 14:35:42
【问题描述】:
我通过 AJAX 请求发送来获取用户。搜索是用户在表单上输入的。发送的 URL 不包含非法字符。 (我知道像 ' 或 这样的字符对于电子邮件地址不正确)
GET http://localhost:1294/Users/GetAll?search=%27test%27%2B%3Cinfo%2540test.pl%3E
查询被编码以保护 XSS,但出现异常:
A potentially dangerous Request.QueryString value was detected
from the client (search="...test' <test@test.pl>").
尽管我在 url 中编码了数据,但我不明白为什么会出现此异常?
【问题讨论】:
标签: c# asp.net-mvc security url encoding