Monday 25 December 2017

javascript - Why does this JSON response have code for an infinite loop?

If you browse certain ISO pages such as href="https://www.iso.org/obp/ui/#iso:pub:PUB400002:en" rel="noreferrer">this
one and look at the network communication as you mouse over items, the JSON
response always starts with for(;;); before following with
actual JSON markup.



Other than perhaps
attempting to punish someone using eval() to parse the JSON, is
there a good reason for this? For example, is it a best practice for guarding against a
certain attack vector?

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...