C# WebMethod 의 Response 데이터가 "d" 로 감싸지는 이유?

SweetDevPotato·2023년 2월 8일
0

출처
What does {"d":""} means in asp.net webservice response


11

It's a security hardening mechanism.

Essentially, it helps protecting against CSRF type of attacks where the attacker reads a JavaScript array (downloaded as Json) from a victim website. They can do that by overriding JavaScript's Array type. d causes the returned Json to not be an array and thus turns Array overriding useless for the attacker.

See this great blog post: http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx

0개의 댓글