Re:JSON is not as safe as people think it is
by zwily on Wednesday March 27, 2013 @10:57AM
(#5449743)
This is why Google, Facebook, and others prepend JSON responses with while(1){}. Any browser trying to eval it will get stuck in an infinite loop, protecting the payload. That's what they did a couple years ago at least. It looks like gmail is now prepending with )]}' for some JSON calls instead.
[ Parent
| on HN ]