Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we prepend anti-eval code to our json responses? #244

Closed
ara4n opened this issue May 6, 2017 · 3 comments
Closed

Should we prepend anti-eval code to our json responses? #244

ara4n opened this issue May 6, 2017 · 3 comments
Labels
A-Client-Server Issues affecting the CS API

Comments

@ara4n
Copy link
Member

ara4n commented May 6, 2017

Google and FB prepend while(1); or for(;;) or similar to the beginning of all their JSON responses to force malicious clients to not be able to eval the responses when stealing data (eg after overriding core bits of JS like Array). Should we too?

@richvdh
Copy link
Member

richvdh commented May 6, 2017

I don't quite understand the attack vector this seeks to block?

@ara4n
Copy link
Member Author

ara4n commented May 6, 2017

This sort of thing: http://blog.jeremiahgrossman.com/2006/01/advanced-web-attack-techniques-using.html

I think that CORS headers probably mitigate it these days, but given the potential risk if people are on crappy clients which don't understand CORS, I wonder if it's worth it anyway.

@richvdh richvdh added the question Further information is requested label Oct 16, 2017
@turt2live turt2live added the A-Client-Server Issues affecting the CS API label Feb 6, 2019
@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 1, 2022
@richvdh richvdh removed the question Further information is requested label Mar 2, 2022
@richvdh
Copy link
Member

richvdh commented Nov 22, 2022

5.5 years later, I'm still failing to grok the attack, and nobody seems that bothered about it. I'm closing this.

@richvdh richvdh closed this as completed Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Client-Server Issues affecting the CS API
Projects
None yet
Development

No branches or pull requests

3 participants