The articles information is very out of date, and relies on multiple issues to successfully work:
* It needs an array literal (eg. []) to be constructed using the function referenced by the Array property on the global object. (This was spec ambiguity and only effects older IE and Firefox -- very old firefox, maybe only up to netscape or phoenix?)
* It needs assignments in object and array literals to call setters on the prototype chain.
Both of these issues were fixed by ES5 (the first may have been fixed in ES3.1) by saying that Array and Object literal notation both use the initial values of Array and Object (so you can't change the constructor used), and by saying that all assignments are "direct" so won't call setters on the prototype chain.
This effectively makes JSON hijacking impossible, except of course for the large numbers of old browsers that are out there.
This is also a distinct issue from JSONP hijacking, for which there isn't a solution other than to not use JSONP.
This effectively makes JSON hijacking impossible, except of course for the large numbers of old browsers that are out there.
This is also a distinct issue from JSONP hijacking, for which there isn't a solution other than to not use JSONP.