안녕하세요! 가끔 어떤 json데이터를 보면 for (;;); 으로 시작하는 데이터가 있던데 이건 뭔가요??? 궁금하네요...ㅎㅎ
http://stackoverflow.com/questions/2669690/why-does-google-prepend-while1-to-their-json-responses
JSON hijacking을 막기 위한 장치입니다.
<script> // Object, Array constructor를 재정의해서 값을 빼돌리는 코드 </script> <script src="http://other.domain.com/info.json"></script>
이런 식으로 도메인이 다른 사이트의 json 형식의 정보를 빼오는 공격 방식이 있는데, JSON 앞에 무한루프를 도는 코드를 넣어서 script 태그로는 접근 못하게 하기 위함입니다.
답변 감사합니다~^^ 덕분에 이유를 알게 되었네요~
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
http://stackoverflow.com
http://stackoverflow.com/questions/2669690/why-does-google-prepend-while1-to-their-json-responses
JSON hijacking을 막기 위한 장치입니다.
이런 식으로 도메인이 다른 사이트의 json 형식의 정보를 빼오는 공격 방식이 있는데, JSON 앞에 무한루프를 도는 코드를 넣어서 script 태그로는 접근 못하게 하기 위함입니다.
답변 감사합니다~^^
답변 감사합니다~^^
덕분에 이유를 알게 되었네요~
댓글 달기