2019年11月22日 星期五

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



最近看到elmah收到奇怪的錯誤訊息

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

看網址,路由也正常,path?querystringname=querystringvalue這樣的格式
後來查了一下
原來要注意的是HTTP_X_WAWS_UNENCODED_URL這個欄位
可以發現他丟過來的是邊碼過的問號符號%3F

所以實際上並不符合查詢參數格式,就判斷為危險字元了

丟這個的還是AdsBot-Google (+http://www.google.com/adsbot.html)
WTF...

沒有留言:

張貼留言