Tagged Questions
2
votes
2answers
326 views
How does a CSRF token prevent an attack, and how can I safely use/avoid it for my JSON API?
I'm trying to make an iOS app communicate with a Ruby on Rails website using JSON. While trying to post a login to create a user session, I discovered I was missing a CSRF token. I had no idea what ...
7
votes
2answers
302 views
Security risks with JSONP?
What are the security risks with JSONP? Is using JSONP in a new web application reasonable, from a security perspective, or is it better to use a different method for cross-origin web mashups?
If ...
3
votes
4answers
750 views
XSS : Content-type: application/json
Background information
- Application responds to request to a particular URL with content-type: application/json
JSON response contains a parameter from the request
Escapes the quote with a slash
...
11
votes
3answers
2k views
How should web app developers defend against JSON hijacking?
What is the best defense against JSON hijacking?
Can anyone enumerate the standard defenses, and explain their strengths and weaknesses? Here are some defenses that I've seen suggested:
If the ...