Script overwriting JSON global

The following script, beginning with version 2.9.43, overwrites the JSON global and breaks our application.

Asked about 2 months ago

I don't know where to report this bug. Surely overwriting a global object is bad practice.

September 23 at 8:43 AM

Same issue here, the window.JSON object is being changed on any site that loads this script.

September 23 at 10:22 AM
Selected Answer

Same problem here. I made a post about it on stackoverflow.

September 23 at 11:58 AM

I was researching on this and found something interesting.

The code inside fbevents.js didn't mess with the global scope, but another script was loaded, and this script is changing the global JSON.

The script is on this URL:

You can open this and search for j.JSON=n. If you prettify the file, add spaces. It also adds JSON3 to the global scope. You can test typing window.JSON3.

September 23 at 12:22 PM

Yes, that is the same source code as referenced in the question. It appears that the numbers in the url are account identifiers. You are correct that the issue surfaces in version 2.9.42 rather than 2.9.43.

September 23 at 12:35 PM

You're right! I think I misread your link ;D sry

September 23 at 12:41 PM

I posted all the details on the stack overflow link

September 23 at 12:50 PM

Nice. I have another bug report in about this as well. Still waiting for a reply...

September 23 at 12:56 PM